简体   繁体   中英

How to set MSBuild to take compilation or build order from solution file

We have set the parallel execution count to 1 so that all the projects will build one after other.In the Visual Studio settings.

With below command from Devenv.exe we are able to compile the solution correctly.

call vcvarsall.bat x86_amd64 devenv /Build "Release|x64" "w:/Frameworks/Frameworks.sln"

But with MSBuild, with below command, the solution is failing to compile, when I cross check the log, the order of compilation of projects is not correct, not taking from solution file.

call vcvarsall.bat x86_amd64 "C:\\Program Files (x86)\\MSBuild\\12.0\\Bin\\MSBuild.exe" "W:\\Frameworks\\Frameworks.sln" /t:build /fl /flp:logfile=Frameworks.log;verbosity=normal /p:Configuration=Release;Platform=x64 /m:1

Any suggestion, how to fix set msbuild to compile only from order mentioned in solution file.

Open your solution in VisualStudio, on the solution explorer right click the solution name and look for "Project Dependencies..." and/or "Project Build Order..."

The UI is self explanatory, so configure as required, save all and try the MsBuild command again.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM