Let me prefix this by saying that I'm no fan of web.config but experience of publishing AspNetCore apps to IIS is really poor.
The configuration system of AspNetCore revolves around ASPNETCORE_ENVIRONMENT variable based on which different configs can be loaded and applied.
Setting this variable for specific deployments is a nightmare and there seems to be a lot of confusion how to go about this:
The crux of the problem seems to boil down to 2 problems:
- web.config transforms as we know them are not supported in ASP.NET Core projects in VS
- the only reasonable way to change ASPNETCORE_ENVIRONMENT is using web.config
Setting a global ASPNETCORE_ENVIRONMENT is not an option as that sets it for every site on a single server. web.config used to be self contained configuration. This dependency on a global env variable is no good in IIS use case.
All in all, I believe the IIS publish story should be of concern as many dev such as myself who are transitioning to AspNetCore want to use their existing infrastructure for deployments and take it step by step. Currently this story is overly complicated and not complete.
Another example where I need web.config transforms: #1701 (comment)
Let me prefix this by saying that I'm no fan of web.config but experience of publishing AspNetCore apps to IIS is really poor.
The configuration system of AspNetCore revolves around ASPNETCORE_ENVIRONMENT variable based on which different configs can be loaded and applied.
Setting this variable for specific deployments is a nightmare and there seems to be a lot of confusion how to go about this:
The crux of the problem seems to boil down to 2 problems:
Setting a global ASPNETCORE_ENVIRONMENT is not an option as that sets it for every site on a single server. web.config used to be self contained configuration. This dependency on a global env variable is no good in IIS use case.
All in all, I believe the IIS publish story should be of concern as many dev such as myself who are transitioning to AspNetCore want to use their existing infrastructure for deployments and take it step by step. Currently this story is overly complicated and not complete.
Another example where I need web.config transforms: #1701 (comment)