First msbuild call freezes

I use a powershell script that internally calls msbuild to create my solutions. This works in principle, so the solution files are fine.

I can repeat the assembly, it works flawlessly.

But the design is hanging

  • when you first run the script (after reboot)
  • after some time / actions during the working day, I don’t know what changes

So, my suspicion is that msbuild is using some kind of component that does not load when I reboot / unload at runtime.

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

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

Any ideas?

+6
source share
1 answer

For anyone who encounters this problem: Roslyn performs a “general compilation” by default, which means that the compilation results are used for further compilation to get speed. You can toggle this by providing "False" for UseSharedCompilation in VBPROJ files or by using a similar switch for MsBuild. Turning this option off will result in slow compilation, but the launch does not freeze.

+8
source

All Articles