ASP.NET Core Web Application web.config
Answered
Hello,
I would like to ask for some help before it totally drives me nuts. When I publish an ASP.NET Core Web Application (Web API) using the minimal API, in the publish folder always there is a `web.config` file.
..\publish\web.config
..\publish\WebApi.exe
..\publish\appsettings.json
As I know web.config file is for IIS Express, but I don't want to use that. It is a self-hosted (Kestrel) console application.
All the configurations come from `appsettings.json`.
So the question is how to prevent `web.config` file generation?
Am I missing something?
Thanks in advance!
Please sign in to leave a comment.
Hello Andras,
We are pretty much running dotnet publish here, so it is not due to Rider, but due to MS SDK. You can add <PublishIISAssets>false</PublishIISAssets> to any <PropertyGroup> in .csproj in order to stop generating web.config though.