-noconfig(C# 编译器选项)-noconfig (C# Compiler Options)

-noconfig 选项告知编译器不要在 csc.rsp 文件中编译,该文件的位置和加载位置是与 csc.exe 文件相同的目录 。The -noconfig option tells the compiler not to compile with the csc.rsp file, which is located in and loaded from the same directory as the csc.exe file.

语法Syntax

-noconfig  

备注Remarks

csc.rsp 文件引用 .NET Framework 随附的所有程序集。The csc.rsp file references all the assemblies shipped with the .NET Framework. Visual Studio .NET 开发环境包括的实际引用取决于项目类型。The actual references that the Visual Studio .NET development environment includes depend on the project type.

可以修改 csc.rsp 文件并使用 csc.exe 的命令行指定每个编译中应包含的其他编译器选项(-noconfig 选项外) 。You can modify the csc.rsp file and specify additional compiler options that should be included in every compilation from the command line with csc.exe (except the -noconfig option).

编译器将处理最后传递给 csc 命令的选项 。The compiler processes the options passed to the csc command last. 因此,命令行中的任何选项都将替代 csc.rsp 文件中相同选项的设置。Therefore, any option on the command line overrides the setting of the same option in the csc.rsp file.

如果不希望编译器查询和使用 csc.rsp 文件中的设置,请指定 -noconfig 。If you do not want the compiler to look for and use the settings in the csc.rsp file, specify -noconfig.

此编译器选项在 Visual Studio 中不可用,并且无法以编程方式更改。This compiler option is unavailable in Visual Studio and cannot be changed programmatically.

请参阅See also