question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Friendly way to shutdown VBCSCompiler and msbuild nodes

See original GitHub issue

There are scenarios where it’s important to shutdown the compiler and msbuild processes that can be reused to speed up subsequent builds. (Note these processes don’t exist on Core yet, but are coming very soon).

We typically recommend shutting down these proceeses before and after CI.

VBCSCompiler supports a ~stop~ -shutdown argument, but the path to VBCSCompiler.dll within the CLI should remain an implementation detail. I don’t know what the equivalent would be for msbuild.

Perhaps we should have a single verb, like dotnet stop-build-servers (actual name TBD), that shuts down all of these.

cc @jaredpar @AndyGerlicher @khyperia @livarcocc

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:28 (25 by maintainers)

github_iconTop GitHub Comments

3reactions
rainersigwaldcommented, Mar 8, 2018

MSBuild negotiates compatibility immediately after connecting to pipes and will disconnect if we don’t see the expected handshake value, which is primarily based on version and includes some other things. The hash computation is spread into several places but is normally in CommunicationUtilities.

For actually shutting down MSBuild, we have an API for that: BuildManager.ShutdownAllNodes() (though we need to test it on Core).

3reactions
jaredparcommented, Mar 8, 2018

actually… what happens if you work on different projects simultaneously with different SDK versions (global.json)?

There is going to be one copy of the server for every Microsoft.Build.Tasks.CodeAnalysis.dll. If the different SDK cause different Microsoft.Build.Tasks.CodeAnalysis.dll to be used in the build process then there will be different VBCSCompiler servers spun up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VBCSCompiler.exe process stays runing after exiting ...
VBCSCompiler is an optimization and is always safe to kill. The VS installer will kill it by default if you hit "Continue" during...
Read more >
MSBuild Server
Shut down or disable MSBuild Server. There are a few different ways to disable the use of MSBuild server. If you just want...
Read more >
Untitled
NET Core in production: Graceful shutdown and reacting to WebIf you want multiple builds for ... Friendly way to shutdown VBCSCompiler and msbuild...
Read more >
Numerous instances of VBCSCompiler.exe
Any way to stop this from happening? Yes. From here there's a property of the compile task in msbuild that turns off the...
Read more >
Dotnet restore clean. cs files) Removing information from ...
So we need to push nuget configuration into Docker image in some way. NET SDKs and runtimes from a system. Open code in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found