Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

/target:module (Create Module to Add to Assembly)

/target:module

Remarks

To not generate an assembly manifest, use the /target:module option. By default, the output file will have an extension of .netmodule.

A file that does not have an assembly manifest cannot be loaded by the .NET Framework common language runtime. However, such a file can be incorporated into the assembly manifest of an assembly by means of /addmodule.

If more than one module is created in a single compilation, internal types in one module will be available to other modules in the compilation. When code in one module references internal types in another module, then both modules must be incorporated into an assembly manifest, by means of /addmodule.

To set this compiler option in the Visual Studio development environment

Creating a module is not supported in the Visual Studio development environment.

To set this compiler option programmatically

See OutputType Property.

Example

Compile in.cs, creating in.netmodule:

csc /target:module in.cs

See Also

/target (Specify Output File Format) | C# Compiler Options

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