Export (0) Print
Expand All
Expand Minimize

/ASSEMBLYRESOURCE (Embed a Managed Resource)

/ASSEMBLYRESOURCE:filename

where:

filename
The managed resource you want to embed in this assembly.

Remarks

Use the /ASSEMBLYRESOURCE option to embed a resource in an assembly.

Resources are public in the assembly when created with the linker. The linker does not allow you to rename the resource in the assembly.

If filename is a .NET Framework resource (.resources) file created, for example, by the Resource File Generator (Resgen.exe) or in the development environment, it can be accessed with members in the System.Resources namespace (see System.Resources.ResourceManager for more information). For all other resources, use the GetManifestResource* methods in System.Reflection.Assembly class to access the resource at run time.

Other linker options that affect assembly generation are:

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the Linker folder.
  3. Click the Input property page.
  4. Modify the Link to Managed Resource File property.

To set this linker option programmatically

See LinkToManagedResourceFile Property.

See Also

Setting Linker Options | Linker Options

Show:
© 2015 Microsoft