【问题标题】:Can Web.config transformations be used with App.config files? [duplicate]Web.config 转换可以与 App.config 文件一起使用吗? [复制]
【发布时间】:2011-03-09 03:46:42
【问题描述】:

可能重复:
App.Config Transformation for 'none web projects' in Visual Studio 2010?

基本上,上面的问题。为不同环境的 web.config 文件提供的新配置转换非常好。

但是,我希望 app.configs 具有不同的测试环境的相同功能。

有没有人知道一种方法来完成这项工作?

提前致谢。

【问题讨论】:

    标签: .net web-config app-config transformation


    【解决方案1】:

    Vishal Joshi 对此发表了一篇文章: Applying XDT magic to App.Config

    这里还有一个关于 StackOverflow 的相关问题,尽管可能已过时: App.Config Transformation for Visual Studio 2010?

    【讨论】:

      【解决方案2】:

      我最近发了一篇关于这个的帖子,你可以在以下位置找到它:

      Visual Studio App.config XML Transformation

      它基于 Vishal Joshi 的帖子,但删除了将 app.config 文件的构建操作更改为 Content 的要求,还添加了对 ClickOnce 部署的支持。

      【讨论】:

        【解决方案3】:

        正式来说,没有。

        不记录,是的。这是我见过的关于启用 app.config 文件转换的最佳博文:

        Vishal Joshi's Tangent: Applying XDT magic to App.config

        【讨论】:

          猜你喜欢
          • 2018-06-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2018-04-20
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多