Skip to content

Conversation

@rokonec
Copy link
Member

@rokonec rokonec commented May 27, 2021

To improve inner loop experience of building small project fast in scenarios:

dotnet new console
dotnet build/run
We force MSBuild to always use external reusable nodes/processes to build projects.

Measured improvement: #6467

Implementation:

Modify SDK to set MSBUILDNOINPROCNODE = 1
Implement escape hatches DOTNET_DO_NOT_USE_MSBUILDNOINPROCNODE = 1

Also see: dotnet/msbuild#6494

@ghost
Copy link

ghost commented May 27, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

internal class MSBuildForwardingAppWithoutLogging
{
private static readonly bool AlwaysExecuteMSBuildOutOfProc = Env.GetEnvironmentVariableAsBool("DOTNET_CLI_RUN_MSBUILD_OUTOFPROC");
private static readonly bool DoNotUseMSBUILDNOINPROCNODE = Env.GetEnvironmentVariableAsBool("DOTNET_CLI_DO_NOT_USE_MSBUILDNOINPROCNODE");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe remove the double negation: DOTNET_CLI_USE_MSBUILD_INPROC_NODE ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to keep name same as is the MSBUILD escape hatch toi avoid confusion between your OUTOFPROC and mine NOINPROC. People might get impression that OUTOFPROC == NOINPROC and get confused why we have two escapes for same thing. Ithough about DOTNET_CLI_DONT_USE_MSBUILD_SERVER_V1 but I believe it is confusing for anyone without knowledge of msbuild server background....

@rokonec rokonec merged commit c0e7d2f into dotnet:main May 28, 2021
@rokonec rokonec deleted the rokonec/msbuild-server-v1 branch May 28, 2021 23:03
dsplaisted added a commit that referenced this pull request Jun 4, 2021
rokonec pushed a commit that referenced this pull request Jun 4, 2021
rokonec added a commit that referenced this pull request Jun 14, 2021
@rokonec rokonec linked an issue Jun 18, 2021 that may be closed by this pull request
@AR-May AR-May mentioned this pull request Jun 20, 2022
ViktorHofer pushed a commit that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MSBuild Service - using MSBULDNOINPROCNODE env var

2 participants