开发者

Passing MSBuild options when calling devenv

Is there a way to pass command line switches to devenv which are开发者_JS百科 then passed as-is when it calls MSBuild?


You definitely can achieve this for /property (/p) key of msbuild. Open .csproj in as text (with notepad.exe): all combinations like $(somename) are properties of msbuild. They can be passed in command line of msbuild via /p:somename=somevalue, but they also can be passed to devenv through environment variable. For example: start Visual Studio Command prompt, in the command prompt type:

set semename=somevalue

devenv

Visual Studio will start. Load a solution of your choice, the property "somename" will be passed to all projects in this solution with the value "somevalue".


Why don't you call MSBuild directly?

msbuild solution.sln /property:Configuration=Debug
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜