Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Enables or disables compiler optimizations.
/optimize[ + | - ]
Arguments
Term |
Definition |
+ | - |
Optional. The /optimize- option disables compiler optimizations. The /optimize+ option enables optimizations. By default, optimizations are disabled. |
Remarks
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 |
|
Example
The following code compiles T2.vb and enables compiler optimizations.
vbc t2.vb /optimize
See Also
Reference
Sample Compilation Command Lines (Visual Basic)