NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

/addmodule (Import Metadata)

/addmodule:file[;file2]

where:

file, file2
An output file that contains metadata. The file cannot contain an assembly manifest. To import more than one file, separate file names with either a comma or a semicolon.

Remarks

The /addmodule option causes the compiler to make all type information from file available to the project you are currently compiling.

file cannot contain an assembly manifest. For example, if the output file was created with /target:module, its metadata can be imported with /addmodule.

If you (implicitly or explicitly) specify any /target option other than /target:module with /addmodule, the files that you pass to /addmodule will become part of the project's assembly. An assembly is required to run an output file that has one or more files added with /addmodule.

Use /reference to import metadata from an output file that does contain an assembly manifest.

Example

Compile source file input.cs and add metadata from metad1.dll and metad2.dll to produce out.exe:

csc /addmodule:metad1.dll;metad2.dll /out:out.exe input.cs

See Also

C# Compiler Options