Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Basic
 /optimize

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Basic Language Reference 
/optimize 

Enables or disables compiler optimizations.

/optimize[ + | - ]
+ | -

Optional. The /optimize- option disables compiler optimizations. The /optimize+ option enables optimizations. By default, optimizations are disabled.

Compiler optimizations make your output file smaller, faster, and more efficient. However, because optimizations result in code rearrangement in the output file, /optimize+ can make debugging difficult.

All modules generated with /target:module for an assembly must use the same /optimize settings as the assembly. For more information, see /target (Visual Basic).

You can combine the /optimize and /debug options.

To set /optimize in the Visual Studio integrated development environment

  1. Have a project selected in Solution Explorer. On the Project menu, click Properties.

    For more information, see Introduction to the Project Designer.

  2. Click the Compile tab.

  3. Click the Advanced button.

  4. Modify the Enable optimizations check box.

The following code compiles T2.vb and enables compiler optimizations.

vbc t2.vb /optimize
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker