8

I am using a powershell script that internally calls msbuild to build my solutions. This works in principle, so the solution files are ok.

I can repeat the build, it works flawlessly.

But the build hangs

  • the first time I start the script (after reboot)
  • after some time / actions during the work day, no idea what changes

So my suspicion is, that msbuild is using some component that is not loaded when I reboot / that is unloaded during the work.

But I have no clue how to find the problem...

I am using this exe: C:\Program Files (x86)\MSBuild\14.0\bin\MsBuild.exe

Any ideas?

klawusel
  • 681
  • 1
  • 6
  • 19

1 Answers1

10

For anybody running into this issue: Roslyn does a "shared compilation" by default, which means that results of compiles are used for further compilations to gain speed. You can switch this of by providing "False" for UseSharedCompilation in VBPROJ files or using a similar switch for MsBuild. Switching this off will do slower compiles but the run does not hang.

klawusel
  • 681
  • 1
  • 6
  • 19
  • here is the link to the final hint:http://stackoverflow.com/questions/31708758/numerous-instances-of-vbcscompiler-exe/31884658#31884658 – klawusel Nov 06 '15 at 13:57
  • 6
    Thank you - this is excellent! The switch to use it directly against msbuild is `/p:UseSharedCompilation=false` – Mark Hughes Nov 13 '15 at 17:30