C# 編譯器選項C# Compiler Options

編譯器會產生可執行檔 (.exe)、動態連結程式庫 (.dll) 或程式碼模組 (.netmodule)。The compiler produces executable (.exe) files, dynamic-link libraries (.dll), or code modules (.netmodule).

每個編譯器選項都能以兩種形式使用︰-option/optionEvery compiler option is available in two forms: -option and /option. 本文件只呈現 -option 形式。The documentation only shows the -option form.

在 Visual Studio 中,您可以在 web.config 檔案中設定編譯器選項。In Visual Studio, you set compiler options in the web.config file. 如需詳細資訊,請參閱 <compiler> 元素For more information, see <compiler> Element.

本節內容In This Section

使用 csc.exe 建置命令列Command-line Building With csc.exe
有關從命令列建置 Visual C# 應用程式的資訊。Information about building a Visual C# application from the command line.

如何:為 Visual Studio 命令列設定環境變數How to: Set Environment Variables for the Visual Studio Command Line
提供執行 vsvars32.bat 來啟用命令列建置的步驟。Provides steps for running vsvars32.bat to enable command-line builds.

依分類列出的 C# 編譯器選項C# Compiler Options Listed by Category
依分類列出編譯器選項。A categorical listing of the compiler options.

依字母順序列出 C# 編譯器選項C# Compiler Options Listed Alphabetically
依字母順序列出編譯器選項。An alphabetical listing of the compiler options.

專案設計工具、建置頁Build Page, Project Designer
設定可控制如何編譯專案、建置及偵錯的屬性。Setting properties that govern how your project is compiled, built, and debugged. 包含有關在 Visual C# 專案中自訂建置步驟的資訊。Includes information about custom build steps in Visual C# projects.

預設和自訂建置Default and Custom Builds
有關建置類型和組態的資訊。Information on build types and configurations.

準備和管理建置Preparing and Managing Builds
在 Visual Studio 開發環境內建置的程序。Procedures for building within the Visual Studio development environment.