How to run a clean build for a particular project from a solution in visual studio

前端 未结 4 1400
故里飘歌
故里飘歌 2020-12-24 05:22

Suppose I need to build a whole solution (which has multiple projects) in command line, is it possible to run a clean build for a particular projects and run an incremental

4条回答
  •  -上瘾入骨i
    2020-12-24 05:46

    Use msbuild and pass the Clean and Rebuild targets:

    msbuild path\to\solution\yoursolution.sln /t:Clean;Rebuild
    

    Or if you only want to rebuild a single project:

    msbuild path\to\project\yourproject.csproj /t:Clean;Rebuild
    

    msbuild is available in the Windows SDK or the Visual Studio Command prompt.

提交回复
热议问题