79312479

Date: 2024-12-27 17:55:15
Score: 1.5
Natty:
Report link

@lonix, In general, we can configure the maximum CPU count at the machine level by setting an environment variable.

You can set the DOTNET_MSBUILD_CLI_OPTIONS environment variables to include the -m option:

On Windows:: Run this command in Command Prompt or PowerShell:

setx DOTNET_MSBUILD_CLI_OPTIONS "-m:3"

This will automatically apply the -m:3 option to every dotnet build invocation.

Hope this approach helps.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @lonix
  • Low reputation (1):
Posted by: Gopinath