build .net solution from batch file

前端 未结 3 1626
说谎
说谎 2021-02-02 15:36

I have a solution file comprising of 15 projects using a few third party dll references. I want to be able to build the solution from a batch file. What is the best way to do th

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 16:22

    One of the simplest ways is to execute msbuild with the solution file as input:

    @echo off
    call %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe path\to\solution.sln
    

    If this is done in a Visual Studio command prompt you can skip the path to msbuild.exe.

提交回复
热议问题