Код: Выделить всё
.csprojКод: Выделить всё
Production
Development
< /code>
Я также попробовал это: < /p>
Development
Production
< /code>
Program.csHostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
builder.Configuration.AddEnvironmentVariables();
string envv = builder.Environment.EnvironmentName;
bool envvv = builder.Environment.IsDevelopment();
Console.WriteLine($"ENVIRONMENT 222 {envv}");
Подробнее здесь: https://stackoverflow.com/questions/797 ... with-debug
Мобильная версия