Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

/ASSEMBLYMODULE (Add a MSIL Module to the Assembly)

/ASSEMBLYMODULE:filename

where:

filename
The module you want to include in this assembly.

Remarks

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:

  1. Create a module with /clr:noAssembly.
  2. 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.
  3. Any project that references this assembly can now also use types from the module.

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 Add Module to Assembly property.

To set this linker option programmatically

See AddModuleNamesToAssembly Property.

See Also

Setting Linker Options | Linker Options

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.