VS2010 调试时未应用 web.config 转换.构建部署包有效 [英] VS2010 When debugging web.config transforms are not being applied. Building a deployment package works

查看:33
本文介绍了VS2010 调试时未应用 web.config 转换.构建部署包有效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调试 Web 应用程序时,不会应用 web.config 转换.我只是发现 web.config 中的配置没有应用我当前使用的配置的转换.

When I debug a web application, the web.config transforms are not applied. I simply find that the configuration in web.config is not applying the transform for the configuration I'm currently using.

然而,如果我构建了一个部署包,我会发现 web.config 确实应用了当前的转换.

Yet if I build a deployment package then I find that the web.config does have the current transforms applied.

调试时是否不应用转换?我开始怀疑是否是这种情况,但我的同事坚持认为这对他们有效.

Are transforms not applied when debugging? I'm starting to wonder if this is the case, but I have coworkers insisting that it works for them.

推荐答案

Web.config 转换仅在发布或部署时应用.

Web.config transforms are only applied when publishing or deploying.

Jared Harding 提供了一个链接,.NET 团队的一名成员在这里的回复中回答了这个问题:VS2010 Clean Web.configs - 不更新

Jared Harding provided a link where a member of the .NET Team answered this question in the response here: VS2010 Clean Web.configs - not updating

为了方便参考他提供的链接是:http://forums.asp.net/p/1532038/3711423.aspx

The link he provided for ease of reference is: http://forums.asp.net/p/1532038/3711423.aspx

这篇关于VS2010 调试时未应用 web.config 转换.构建部署包有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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