[Tips]*.rsp文件 == MSBuild Response File

偶然把玩某源码,竟然找不到何处制定3rd party的路径,也没有发现vcprops文件,怪哉。用关键字在文件内狂搜索一把,发现妙谛竟在一个*.rsp文件。

 也顺带也解决了error C2220: warning treated as error - no object file generated。明白看到Project Properties中为"/WX-",Why?

原因就在于RSP文件和Project Properties不一致,其实在Output窗口一开始就有下面这个Waring,只不过没有留意而已:

1>cl : Command line warning D9025: overriding '/WX-' with '/WX'

 

# RSP文件知识

RSP file is a MSBuild Response File. MSBuild is the build system for Visual Studio. The auto-response file is a special .rsp file that MSBuild.exe automatically uses when building a project.

Response (.rsp) files are text files that contain MSBuild.exe command line switches. Each switch can be on a separate line or all switches can be on one line. Comment lines are prefaced with a # symbol. The @ switch is used to pass another response file to MSBuild.exe.

The auto-response file is a special .rsp file that MSBuild.exe automatically uses when building a project. This file, MSBuild.rsp, must be in the same directory as MSBuild.exe, otherwise it will not be found. You can edit this file to specify default command line switches to MSBuild.exe. For example, if you use the same logger every time you build a project, you can add the /logger switch to MSBuild.rsp, and MSBuild.exe will use the logger every time a project is built.

 

# References:

[MSBuild Response Files] (http://msdn.microsoft.com/en-us/library/ms404301.aspx)

 

 

你可能感兴趣的:(response)