用于调试的 VS 2010 Web.config 转换

发布于 2024-09-04 04:40:56 字数 146 浏览 5 评论 0原文

我是新的 VS 2010 Web.config 转换的粉丝。我将此功能用于部署目的,并想知道是否也可以使用它们进行调试。

我考虑在 IDE 中使用它们:我想创建不同的构建配置(带有链接的转换配置);选择其中之一;在 IDE 中启动网站并以这种方式调试不同的配置。

I’m a fan of the new VS 2010 Web.config transformations. I use this feature for deployment purposes and wondered if it is possible to use them for debugging too.

I think of using them in the IDE: I want to create different built configuration (with linked transformation configurations); choose one of them; start the web site in the IDE and debug the different configurations this way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

大海や 2024-09-11 04:40:56

更新

感谢第 3 方插件,SlowCheetah< /a>,现在这是可能的。 Scot Hanselman 有一篇关于此的博客文章


原始响应:

不幸的是,web.config 转换似乎仅影响发布站点和构建部署包。

在我们的场景中,我们有两个开发组,一个可以访问多个环境(内部),另一个可以访问单个环境(离岸)。有时,内部团队需要直接针对 QA 进行调试,而离岸团队仍处于锁定状态(因此他们的 web.config 必须指向开发环境)。

我们希望每个环境有 1 个构建配置,并且能够选择与要调试的环境相匹配的构建配置——据我所知,这是您的问题。

Update

Thanks to a 3rd party plugin, SlowCheetah, this is now possible. Scot Hanselman has a blog post about it.


Original response:

Unfortunately, the web.config transformations appear to effect only publishing sites and building deployment packages.

In our scenario we have two development groups, one with access to multiple environments (in-house) and the other with access to a single environment (offshore). We have periods where the in-house group needs to debug directly against QA, while offshore remains locked-out (so their web.config's must point to the dev environment).

We were hoping to have 1x build-configuration per-environment, and be able to choose the build-configuration which matched the environment to debug against--which, as I understand it is your question.

别低头,皇冠会掉 2024-09-11 04:40:56

如果有人好奇为什么他们没有构建此功能,来自:
http://forums.asp.net/p/1532038/3711423.aspx

“当 Web 应用程序运行时,项目根文件夹下的 web.config 将被 asp.net 拾取,不幸的是,我知道它处于源代码控制之下。我当然理解让运行时使用转换后的 web.config 带来的清洁性来自临时文件夹;但是,asp.net 运行时对 vs projec 结构一无所知,并且它完全基于目录结构,因为子文件夹下的 web.config 可能会继承来自上层的设置。目录级别。”

In case anyone is curious why they haven't built this feature, from:
http://forums.asp.net/p/1532038/3711423.aspx

"When the web app gets run, the web.config under project root folder will be picked up by asp.net and I know unfortunately it is under source control . I certainly understand the cleanness coming with letting runtime use a transformed web.config from a temp folder; however, asp.net runtime doesn't know anything about vs projec structure and it is totaly based on directory structure. Using alternate path might also break as a web.config under a subfolder expect to inherit settings from the upper level of directory."

御弟哥哥 2024-09-11 04:40:56

我找到了一个不涉及任何第三方工具的替代解决方案: http:// /ledtalks.blogspot.in/2011/09/webconfig-transformations-when.html。我只对 web.config 文件尝试过这个

I found an alternative solution that does not involve any third party tool: http://ledtalks.blogspot.in/2011/09/webconfig-transformations-when.html. I only tried this for the web.config file

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文