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.