Question

set Unified=C:\Workspaces\Main\Unified\UnifiedFX.sln
set Fullserver=C:\Workspaces\Main\Unified\FullServer\Tests\FullServer.Automation\FullServer.Automation.csproj
set Management=C:\Workspaces\Main\Unified\Management\Tests\Management.Automation\Management.Automation.csproj
set Move=C:\Workspaces\Main\Unified\Move\Tests\Move.Automation\Move.Automation.csproj
set d64="Debug|x64"
set d86="Debug|x86"

for %%a in (%d64%, %d86%) do (
      for %%b in (%Fullserver%, %Move%, %Management%) do (
                devenv %Unified% /build %%a /project %%b))

That's my .bat file. When I run it it takes near-ish 90 seconds to complete. Yet I can build each individual project from within Visual Studios 2010 in just a couple seconds, plus the time it takes to switch between x64 and x86. Why is the bat file so slow?

Was it helpful?

Solution

You are loading visual studio for each project, I will bet that it's this that is the most time consuming.

Instead of running devenv.exe to run the build, just use MSBUILD.EXE on the csproj or sln files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top