Visual Basic Compiler Options  

/target:module

Causes the compiler to generate a module that can be added to an assembly.

/target:module

-or-

/t:module

Remarks

The output file is created with an extension of .netmodule.

The .NET common language runtime cannot load a file that does not have an assembly. However, you can incorporate such a file into the assembly manifest of an assembly by using /reference.

When code in one module references internal types in another module, both modules must be incorporated into an assembly manifest by using /reference.

/addmodule imports metadata from a module.

The short form of /target:module is /t:module.

Note   The /target:module option is not available from within the Visual Studio development environment; it is available only when compiling from the command line. It cannot be changed programmatically.

Example

The following code compiles in.vb, creating in.netmodule:

vbc /target:module in.vb

See Also

/reference | /target | /target:exe | /target:library | /target:winexe | Visual Basic Compiler Options | Sample Compilation Command Lines