Building a solution file using msbuild

前端 未结 2 1793
我寻月下人不归
我寻月下人不归 2020-12-23 13:34

I was about to build a Visual Studio solution file using msbuild. I used the following commandline for building the solution

msbuild.exe SolutionFile.sln /t:         


        
2条回答
  •  天命终不由人
    2020-12-23 14:18

    Set the verbosity property to diagnostic and save the output to a file. This will help you determine which project in your solution is hanging and help diagnose your problem.

    The command line syntax would be as follows to save the output to a file named MyProjectOutput.log :

    msbuild SolutionFile.sln /t:build /fl /flp:logfile=MyProjectOutput.log;verbosity=diagnostic
    

    It also appears that you need a space after the /t target to build parameter passed in the command you listed.

    msbuild.exe SolutionFile.sln /t:Build /p:Configuration=Release;Platform=Win32
    

    Also, are you sure that every project contains a "Release" and "Win32" configuration? You could try just running the below command as well and see what gets compiled. Msbuild will automatically run the default target and configurations needed.

    msbuild SolutionFile.sln
    

    Another option you can try is to just compile the project and see what is produced:

    msbuild "D:\SolutionPath\ProjectFile10.vcxproj" /fl /flp:logfile=MyProjectOutput.log;verbosity=diagnostic
    

提交回复
热议问题