-
Notifications
You must be signed in to change notification settings - Fork 10.3k
RC2 Visual Studio publish writes its own Web.Config #1562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are you sure? In my case variables like %LAUNCHER_PATH% are replaced, but custom settings like:
Are presisted into published config. |
I'm positive - I lose an entire "security" section. |
@glent1 - did you upgrade your application from RC1? If you comment out postpublish scripts does the web.config look fine after publishing? |
Ad I understand it, the publish process does edit the web.config a bit to help IIS find/run the app. Like @glent1 said, try removing this bit and see if it re-writes the config: "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] |
I did indeed convert it from RC1. And Beta8, Beta7 etc. The suggestion to remove the postpublish script lead me to the real problem - I wasn't explicitly including the web.config in the publishOptions include list. I had previously compared a clean project to mine and made the updates manually and had obviously missed this one. Thanks for the help guys. |
Yeah - that's why I asked. There are some gotchas when moving from RC1 to RC2. In this case publish-iis did not find web.config and create a new one for you. I think publish-iis actually prints a message when it happens. Found it: https://github.com/aspnet/IISIntegration/blob/dev/src/Microsoft.AspNetCore.Server.IISIntegration.Tools/PublishIISCommand.cs#L48 |
I have a web.config in the root of my web project that has some application specific settings. This is not the web.config that gets populated into the publish folder, which seems to be entirely dynamically created. Is there any way to control this?
The text was updated successfully, but these errors were encountered: