简体   繁体   中英

Reduce the execution time of VisualStudio solution Build using msbuild

I have an MSbuild project used for building Visual studio solution.Before using msbuild it was using devenv.exe for building the solution.It took only 1 hour to build the solution. After using msbuild it is taking 3 hours

<Target Name ="Buildsln">
   <MSBuild  Projects="$(Solutionpath)\Test.sln"  Targets="Rebuild"
             Properties="Configuration=Release;Platform=Win32" BuildInParallel="True">
   </MSBuild>
</Target>

How can i increase the speed

If i use msbuild.exe from an EXEC task with /m switch it is taking only 1 hour. But i couldn't use that. Please provide any suggestions

I notice your MSBuild is doing a "Rebuild" instead of a Build. When you build within VS are you doing a full Rebuild or a regular Build. Rebuild will typically be much slower and could explain the behavior you're seeing.

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