可能的重复:
“非 Web 项目”的 App.Config 转换在 Visual Studio 2010 中?
基本上就是上面的问题。为不同环境的 web.config 文件提供的新配置转换非常好。
但是,我希望 app.configs 具有相同的功能,但在不同的测试环境中会有所不同。
有谁知道如何使这项工作有效?
提前致谢。
Possible Duplicate:
App.Config Transformation for 'none web projects' in Visual Studio 2010?
Basically, the question above. The new config transformations that are provided for a web.config file for different environments are really nice.
However, I'd like the same functionality for app.configs that vary across testing environments.
Does anyone know of a way to make this work?
Thanks in advance.
发布评论
评论(3)
Vishal Joshi 有一篇关于此的帖子:
将 XDT 魔法应用于 App.Config
StackOverflow 上还有一个相关但可能已过时的问题:
Visual Studio 2010 的 App.Config 转换?
Vishal Joshi has a post on this:
Applying XDT magic to App.Config
There's also a related, though possibly dated, question on StackOverflow here:
App.Config Transformation for Visual Studio 2010?
我最近发表了一篇关于此的文章,您可以在以下位置找到它:
Visual Studio App.config XML 转换
它基于 Vishal Joshi 帖子,但删除了将 app.config 文件的构建操作更改为内容的要求,并且还添加了支持 ClickOnce 部署。
I recently made a post about this, you can find it at:
Visual Studio App.config XML Transformation
It's based on the Vishal Joshi post but removes the requirement to change the build action of the app.config files to Content and also adds support for ClickOnce deployment.
官方说法是,没有。
不公开记录,是的。这是我见过的关于启用 app.config 文件转换的最佳博客文章:
Vishal Joshi 的切线:将 XDT 魔法应用于 App.config
Officially, no.
Off the record, yes. Here's the best blog post I've seen on enabling the transformations for app.config files:
Vishal Joshi's Tangent: Applying XDT magic to App.config