Use launchSettings.json outside debugging environment?

2022-01-13T11:40:07.403+00:00

I'm having a .NET core desktop application where I need to set some environment variables before the runtime starts up. Specifically I need to set the DOTNET_Thread_UseAllCpuGroups=true to enable NUMA core processing. Currently I couldn't find any way to set the environment variables. runtimeConfig.json does not allow this.

Developer technologies | .NET | .NET Runtime
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-01-13T15:55:25.783+00:00

    Environment variables are set before running the program. You could make a bat file that sets the variables, then runs the app.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.