Condividi tramite


/ASSEMBLYLINKRESOURCE (Link to .NET Framework Resource) 

/ASSEMBLYLINKRESOURCE:filename

Remarks

where:

  • filename
    The .NET Framework resource file to which you want to link from the assembly.

Remarks

The /ASSEMBLYLINKRESOURCE option creates a link to a .NET Framework resource in the output file; the resource file is not placed in the output file. /ASSEMBLYRESOURCE embeds a resource file in the output file.

Linked resources are public in the assembly when created with the linker.

/ASSEMBLYLINKRESOURCE requires that the compilation include /clr; /LN or /NOASSEMBLY is not allowed with /ASSEMBLYLINKRESOURCE.

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

filename can be any file format. For example, you may want to make a native DLL part of the assembly, so it can be installed into the Global Assembly Cache and accessed from managed code in the assembly.

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 Command Line property page.

  4. Type the option into the Additional Options box.

To set this linker option programmatically

See Also

Reference

Setting Linker Options
Linker Options