使用Visual Web Developer Express发布时如何排除web.config? [英] How to exclude web.config when publishing with Visual Web Developer Express?

查看:78
本文介绍了使用Visual Web Developer Express发布时如何排除web.config?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Web Developer Express Edition 2008中的项目发布功能时.如何排除发布web.config以便不覆盖服务器web.config?

When using the project publish feature in Visual Web Developer Express Edition 2008. How can you exclude publishing the web.config so that it doesn't overwrite the server web.config?

我尝试在web.config中设置以下内容,该设置可用于以.config结尾的其他任何文件,但由于某种原因不适用于web.config.

I've tried setting the following in the web.config, which works for any other files ending .config but not the web.config for some reason.

<buildProviders>
  <remove extension=".config" />
  <add extension=".config" type="System.Web.Compilation.IgnoreFileBuildProvider"/>
</buildProviders>

推荐答案

我不敢相信这是如此简单,但却从未得到答案.我在这个

I can't believe this is so simple but never got answered. I found the answer in this question

只需选择web.config属性,然后将构建操作"更改为无",将复制到输出目录"更改为不复制"

Simply select the web.config properties and change 'Build Action' to 'None' and 'Copy To Output Directory' to 'Do Not copy'

这篇关于使用Visual Web Developer Express发布时如何排除web.config?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆