【发布时间】:2011-08-22 15:48:24
【问题描述】:
想在这里挑选那些 MS Build/VS Post 构建指数的大脑。
我希望根据用户/机器/环境自定义我的 web.config 条目。
我可以在 web.config 中标记我的可配置/可更改条目,并希望这些条目被相应的用户/环境文件覆盖,并希望有一个顺序来决定如果找到条目应该优先于另一个条目在多个文件中。
例如:web.config 有一个 $connectionstring 条目,每个用户/环境的自定义文件可能具有替换 $connectionstring 的潜在值,具体取决于构建解决方案的上下文/配置
这意味着,我可以有一组如下文件:
user_joe.config
$connectionstring = db_where_joe_like_to_connect_to
staging.config
$connectionstring = db_where_staging_connect_to
生产.config
$connectionstring = db_production
因此,如果 joe 从他的开发框中编译解决方案,则 web.config 的 $connectionstring 应该具有值“db_where_joe_like_to_connect_to”。
我希望有一个不涉及 Nant 的解决方案。
希望有人能指点一下。
【问题讨论】:
标签: visual-studio-2010 msbuild post-build-event