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

/target:module (C# Compiler Options)

This option causes the compiler to not generate an assembly manifest.


By default, the output file created by compiling with this option 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.

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

For information on how to set this compiler option programmatically, see OutputType.

Compile in.cs, creating in.netmodule:

csc /target:module in.cs
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.