|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
/ASSEMBLYMODULE (Add a MSIL Module to the Assembly)
The /ASSEMBLYMODULE option allows you to add a module reference to an assembly. Type information in the module will not be available to the assembly program that added the module reference. However, type information in the module will be available to any program that references the assembly.
Use #using to both add a module reference to an assembly and make the module's type information available to the assembly program.
For example, consider the following scenario:
Create a module with /LN.
Use /ASSEMBLYMODULE in a different project to include the module in the current compilation, which will create an assembly. This project will not reference the module with #using.
Any project that references this assembly can now also use types from the module.
Other linker options that affect assembly generation are:
The Visual C++ linker accepts .netmodule files as input and the output file produced by the linker will be an assembly or .netmodule with no run-time dependence on any of the .netmodules that were input to the linker. For more information, see.
To set this linker option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the Linker folder.
Click the Input property page.
Modify the Add Module to Assembly property.
To set this linker option programmatically