I’m trying to run my .net 8 service on Windows 10×64 22H2 via
dotnet run –environment Test
or
dotnet run –environment Production
but it always prints:
Hosting environment: Development
What should I do to enforce the service use the specific environment?