Export (0) Print
Expand All

Advanced Compiler Settings Dialog Box (Visual Basic)

Updated: July 2008

Use the Advanced Compiler Settings dialog box of the Project Designer to specify the project's advanced build-configuration properties. This dialog box applies to Visual Basic projects only. For more information, see How to: Set Compiler Options.

To access this dialog box, select a project node in Solution Explorer, and then, on the Project menu, click Properties. When the Project Designer appears, click the Compile tab. On the Compile page, click the Advanced Compile Options button.

NoteNote:

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

The following options specify optimizations that can in some cases make a program file smaller, make a program run faster, or speed up the build process. See How to: Set Compiler Optimizations.

Remove integer overflow checks

By default, this check box is cleared to include integer overflow checks. Select this check box to remove integer overflow checks.

Enable optimizations

By default, this check box is cleared to disable compiler optimizations. Select this check box to enable compiler optimizations.

DLL base address

This text box displays the default DLL base address in hexadecimal format. In Class Library and Control Library projects, you can use this text box to specify the base address to be used when the DLL is created.

Generate debug info

Select None, Full, or pdb-only from the list. None specifies that no debugging information be generated. Full specifies that full debugging information be generated, and pdb-only specifies that only PDB debugging information be generated. By default, this option is set to Full.

Conditional compilation constants determine whether tracing and debugging statements should be compiled into the assembly. See How to: Set Compilation Constants and Conditional Compilation Constants.

Define DEBUG constant

By default, this check box is selected, specifying that a DEBUG constant be set.

Define TRACE constant

By default, this check box is selected, specifying that a TRACE constant be set.

Custom constants

Enter any custom constants for your application in this text box. Entries should be delimited by commas, using this form: Name1="Value1",Name2="Value2",Name3="Value3".

Generate serialization assemblies

This setting specifies whether the compiler will use the XML Serializer Generator Tool (Sgen.exe) to create XML serialization assemblies. Serialization assemblies can improve the startup performance of XmlSerializer if you have used that class to serialize types in your code. By default, this option is set to Auto, which specifies that serialization assemblies be generated only if you have used XmlSerializer to encode types in your code to XML. Off specifies that serialization assemblies never be generated, regardless of whether your code uses XmlSerializer. On specifies that serialization assemblies always be generated. Serialization assemblies are named TypeName.XmlSerializers.dll.

Target CPU

This setting specifies whether the compiler should optimize compilation for a specific CPU type, for example, a 64-bit processor. Select AnyCPU, x86, x64, or Itanium from the list. By default, this option is set to AnyCPU, specifying that the compiler not optimize compilation for a specific CPU type.

NoteNote:

Visual Basic Express does not support optimization for a specific CPU type. This is supported only in the full Visual Studio product.

Target framework (all configurations)

Specifies the .NET Framework version that the application targets. This setting can have the following values:

.NET Framework 2.0

.NET Framework 3.0

.NET Framework 3.5

The default setting is .NET Framework 3.5. When you change this value to .NET Framework 3.5, a reference to System.Core and a project-level import for System.Linq are added automatically. If you want to use LINQ features, you will also need to turn Option Infer on. The reference and import are removed automatically if you change the target framework to 3.0 or 2.0.

NoteNote:

The prerequisite packages listed in the Prerequisites Dialog Box are set automatically the first time that you open the dialog box. If you subsequently change the project's target framework, you will have to select the prerequisites manually to match the new target framework.

For more information, see How to: Target a Specific .NET Framework and Visual Studio Multi-Targeting Overview.

Client-only Framework subset (New in Visual Studio 2008 SP1.)

Specifies that the application targets the .NET Framework Client Profile, which provides a redistribution package that installs the minimum set of client assemblies on target computers, without requiring that the full .NET Framework be present. For more information, see .NET Framework Client Profile.

Date

History

Reason

July 2008

Added information about the Client-only Framework subset option.

SP1 feature change.

Community Additions

ADD
Show:
© 2014 Microsoft