7

When calling devenv.com from command line or FinalBuilder action within our automated build it sometimes hangs and never gets past compiling step.

It is called with this parameters from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE:

devenv.com /build "Release|Any CPU" "D:\MyProject\MySolution.sln"

It hangs forever on this step. When I open it in VS 2013 and ReBuild the solution it works fine every time.

Any ideas? I've also tried it on other build machines and it does the same. So it is not machine dependent.

Oliver Nilsen
  • 1,017
  • 2
  • 12
  • 32
  • Building with devenv.com was deprecated at VS2010. Time to move to MSBuild.exe, this ought to be inspiration enough :) If you still have problems then post the build trace you get with /v jacked-up. – Hans Passant Sep 26 '14 at 12:28
  • MSBuild.exe is not an option. It is a policy thing. Our automated builds should build the same way a developer builds on his local machine in VS. So you are saying I should append "/v" parameter to devenv.com? – Oliver Nilsen Sep 26 '14 at 12:31
  • 1
    *Very* hard to get help when you're stuck with very silly policies like that. I have to recommend [this site](http://careers.stackoverflow.com/). – Hans Passant Sep 26 '14 at 13:08
  • https://connect.microsoft.com/VisualStudio/feedback/details/586358/msbuild-ignores-projectsection-projectdependencies-in-sln-file-and-attempts-to-build-projects-in-wrong-order and https://connect.microsoft.com/VisualStudio/feedback/details/586875/msbuild-4-0-incorrectly-processes-project-dependencies-specified-in-solution-file. MSFT closed the issues as fixed, but the problem still exists. That is why VS does not trust solution processing to msbuild, instead it composes the dependency graph all by itself, using msbuild to build individual projects. There is much sense in using devenv build. – mark Nov 07 '14 at 04:02
  • In VS2019, the solution or project filename needs to come before /build or /rebuild. Not sure if that applies to VS2013. – MikeOnline Oct 01 '21 at 19:29

3 Answers3

3

After a lot of troubleshooting and looking through various logs, solutions, googling, I figured out that this is caused by the Extension Manager in Visual Studio 2013. You can find the extension manager in all Visual Studio version -> Tools -> Extensions and updates.

So by uninstalling the Nuget Package Manager from Visual Studio 2013, made it the solutions compile successfully every time.

Oliver Nilsen
  • 1,017
  • 2
  • 12
  • 32
1

Another fix we noticed and could reproduce every time is when our virtual machine in Hyper-V was given 2 CPUs, it would cause builds to hang every time. Reducing the VM to only have 1 CPU fixes the problem.

Oliver Nilsen
  • 1,017
  • 2
  • 12
  • 32
0

We have solved this by creating a new .sln and adding existing projects to it. NuGet info is now revomed from the .csproj files and we now use "nuget.exe restore" to update NuGet packages before a call to devenv.com. This has fixed it for some projects.

Oliver Nilsen
  • 1,017
  • 2
  • 12
  • 32