Last post Apr 15, 2019 09:25 AM by Fieel
Apr 01, 2019 02:20 PM|Fieel|LINK
I've been given a project written with .NET Framework 4.5.2 and i have a problem to fix: whenever I publish an asp.net MVC project using the web publish utility in
VSCode Visual Studio 2017 I automatically generate a web.config file along with the built project.
In this case, the web.config file is not correct: in this specific case the web.config file isn't handling the automatic HTTP to HTTPS redirect so I always have to manually edit a web.config file every time (or worse, I always have to overwrite the automatically
generate web.config file with my custom one every time I publish).
What's the best way to handle web.config files? How can I upload my custom one, or better, how can I generate a correct one?!
Thanks in advance :)
Apr 02, 2019 06:53 AM|Yuki Tao|LINK
Visual Studio Code does not have an integrated build system (Web Publish) like Visual Studio does.
How do you publish your project?
Comment Line or Extensions?
Apr 02, 2019 07:19 AM|Fieel|LINK
my bad, i'm using Visual Studio 2017 Enterprise, it was a typo!
Apr 02, 2019 10:12 AM|Yuki Tao|LINK
What is your file Properties of your web.config.
You could pay attention to the Build Action,it represents how the file relates to the build and deployment processes.
"Content" is the default value.
You could refer to this link:
Do you mean you want to synchronize web.config for formal and
If so,you can only copy files manually.
Apr 15, 2019 09:25 AM|Fieel|LINK
Thanks Yuki, the web.config properly "Build Action" wasn't properly setup as expected!
Now my custom web.config gets published along with the rest of the project. :)