This documentation is archived and is not being maintained.

EmbedManagedResourceFile Property

Visual Studio .NET 2003

Sets or returns the specified embedded .NET (or .NET Framework) resource file. Exposes the functionality of the /ASSEMBLYRESOURCE linker option.

[Visual Basic.NET]
Public Property EmbedManagedResourceFile() As String
[Visual Basic 6]
Property Get EmbedManagedResourceFile() As String
Property Let EmbedManagedResourceFile( _
   ByVal NewValue As String _
) 
[C++]
HRESULT __stdcall get_EmbedManagedResourceFile(
   /* [out, retval] */ BSTR* retVal
);
HRESULT __stdcall put_EmbedManagedResourceFile(
   /* [in] */ BSTR NewValue
);
[C#]
public string EmbedManagedResourceFile {get; set;}
[JScript.NET]
public function get EmbedManagedResourceFile() : String
public function set EmbedManagedResourceFile(
   NewValue : String
)

Parameters

NewValue
A string representing the managed resource file to embed.

Return Value

The specified embedded .NET (or .NET Framework) resource file.

Example

The following sample code modifies the EmbedManagedResourceFile property in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
  Sub Test()
    Dim prj As VCProject
    Dim cfgs, tools As IVCCollection
    Dim cfg As VCConfiguration
    Dim tool As VCLinkerTool
    prj = DTE.Solution.Projects.Item(1).Object
    cfgs = prj.Configurations
    cfg = cfgs.Item(1)
    tool = cfg.Tools("VCLinkerTool")
    tool.EmbedManagedResourceFile = "c:\MyResource.rc"
    MsgBox("Embedded resource file: " & tool.EmbedManagedResourceFile)     
  End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCLinkerTool Object

Show: