Friendly way to shutdown VBCSCompiler and msbuild nodes
See original GitHub issueThere 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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:28 (25 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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).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.