How to get cmd line build command for VS solution?

前端 未结 6 885
名媛妹妹
名媛妹妹 2020-12-02 17:28

This is probably easy but I am getting stuck: when I build a solution in Visual Studio - how do extract the exact cmd line for the current build command in order to be able

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 18:01

    You can start msbuild from the command line. msbuild understands .sln (solution) files. You can specify the .sln file and the build configuration (debug, release etc.) from the command line.

    http://msdn.microsoft.com/en-us/library/ms164311.aspx
    Here is the documentation on what you can do with msbuild. MSBuild.exe is installed with the .net framework, not with visual studio. You can find it in c:\windows\microsoft.net\framework\v3.5 (or v2.0.50727)

    I searched a bit and found that you can also do a command line build with visual studio using devenv.exe /build, more info here:
    http://msdn.microsoft.com/en-us/library/xee0c8y7(VS.80).aspx

提交回复
热议问题