且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我如何prevent从覆盖配置文件“发布网站”?

更新时间:2022-12-05 23:05:29

在Visual Studio解决方案资源管理器,进入你的web.config文件的属性。确保建设行动是无和复制到输出目录就是不要复制。

In Visual Studio solution explorer, go to your web.config file's properties. Make sure "Build Action" is "None" and "Copy to Output Directory" is "Do not copy".

如果你想在未来的更新,你必须做手工或更改建设行动回内容。下一次你建立(或发布),它会覆盖它。

If you ever want to update it in the future you'll have to do it manually or change "Build Action" back to "Content". The next time you build (or publish) it will overwrite it.