Build Page, Project Designer (C#)

Use the Build page of the Project Designer to specify the project's build configuration properties. This page applies to Visual C# projects only.

Note

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.

Configuration and Platform

The following options enable you to select the configuration and platform to display or modify.

Note

With simplified build configurations, the project system determines whether to build a debug or release version. Therefore, these options are not displayed. For more information, see Debug and Release Project Configurations.

  • Configuration
    Specifies which configuration settings to display or modify. The settings can be Active (Debug) (this is the default), Debug, Release, or All Configurations.

  • Platform
    Specifies which platform settings to display or modify. The default setting is Active (Any CPU). You can change the active platform using the Configuration Manager. For more information, see How to: Create and Edit Configurations.

General

The following options enable you to configure general settings for the build process.

  • Conditional compilation symbols
    Specifies symbols on which to perform conditional compilation. Separate symbols with a space. For more information, see /define (C# Compiler Options).

  • Define DEBUG constant
    Defines the DEBUG symbol. Selecting this is equivalent to using the /define:DEBUG command line option.

  • Define TRACE constant
    Defines the TRACE symbol. Selecting this is equivalent to using the /define:TRACE command line option.

  • Platform target
    Specifies the processor to be targeted by the output file. Select x86 for any 32-bit Intel-compatible processor, select Itanium for the Intel 64-bit Itanium processors. select x64 for other 64-bit processors, and select Any CPU to specify that any processor is acceptable. For more information, see /platform (C# Compiler Options).

  • Allow unsafe code
    Allows code that uses the unsafe keyword to compile. For more information, see /unsafe (C# Compiler Options).

  • Optimize code
    Enable or disable optimizations performed by the compiler to make your output file smaller, faster, and more efficient. For more information, see /optimize (C# Compiler Options).

Errors and Warnings

The following settings are used to configure the error and warning options for the build process.

  • Warning level
    Specifies the level to display for compiler warnings. For more information, see /warn (C# Compiler Options).

  • Suppress warnings
    Blocks the compiler's ability to generate one or more warnings. Separate multiple warning numbers with a comma or semicolon. For more information, see /nowarn (C# Compiler Options).

Treat Warnings as Errors

The following settings are used to specify which warnings are treated as errors. Select one of the following options to indicate under what conditions to return an error when the build encounters a warning. For more information, see /warnaserror (C# Compiler Options).

  • None
    Treats no warnings as errors.

  • Specific warnings
    Treats the specified warnings as errors. Separate multiple warning numbers with a comma or semicolon.

  • All
    Treats all warnings as errors.

Output

The following settings are used to configure the output options for the build process.

  • Output path
    Specifies the location of the output files for this project's configuration. Enter the path of the build output in this box, or choose the Browse button to specify a path. Note that the path is relative; if you enter an absolute path, it will be saved as relative. The default path is bin\Debug or bin\Release\. For more information, see Debug and Release Project Configurations.

    With simplified build configurations, the project system determines whether to build a debug or release version. The Build command from the Debug menu (F5) will put the build in the debug location regardless of the Output path you specify. However, the Build command from the Build menu puts it in the location you specify. For more information, see Debug and Release Project Configurations.

  • XML documentation file
    Specifies the name of a file into which documentation comments will be processed. For more information, see /doc (C# Compiler Options).

  • Register for COM interop
    Indicates that your managed application will expose a COM object (a COM callable wrapper) that allows a COM object to interact with your managed application. The Output type property in the Application page of the Project Designer for this application must be set to Class Library in order for the Register for COM interop property to be available. For an example class that you might include in your Visual C# application and expose as a COM object, see Example COM Class (C# Programming Guide).

  • Generate serialization assembly
    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 should be generated. Serialization assemblies are named TypeName.XmlSerializers.dll. For more information, see XML Serializer Generator Tool (Sgen.exe).

  • Advanced
    Click to display the Advanced Build Settings Dialog Box (C#) dialog box.

See Also

Concepts

Projects, User Interface Elements

Other Resources

C# Compiler Options

Change History

Date

History

Reason

January 2012

Modified information about the Output path.

Information enhancement.