I have a .NET 8 app that is self-contained and published, I’m trying to switch between the multiple environments configurations using command line:
c:pathapp.exe --environment Development
but it’s not working, it always defaults to Production
.
I’m using
var builder = Host.CreateApplicationBuilder(args);