Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

/nostdlib (Visual Basic)

Causes the compiler not to automatically reference the standard libraries.

/nostdlib

The /nostdlib option removes the automatic reference to the System.dll assembly and prevents the compiler from reading the Vbc.rsp file. The Vbc.rsp file—which is located in the same directory as the Vbc.exe file—references the commonly used .NET Framework assemblies and imports the System and Microsoft.VisualBasic namespaces.

NoteNote:

The Mscorlib.dll and Microsoft.VisualBasic.dll assemblies are always referenced.

NoteNote:

The /nostdlib option is not available from within the Visual Studio development environment; it is available only when compiling from the command line.

The following code compiles T2.vb without referencing the standard libraries. You must set the _MYTYPE conditional-compilation constant to the string "Empty" to remove the My object.

vbc /nostdlib /define:_MYTYPE=\"Empty\" T2.vb

Community Additions

ADD
Show:
© 2015 Microsoft