标签:.config att value match tin attr debug 替换 --
--满足条件,替换为正式环境的dll
if not $(ConfigurationName) == Pro goto end
xcopy $(SolutionDir)release $(SolutionDir)debug\bin /E /I /Y
:end
--web.Pro.config
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ProSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
<appSettings>
<add key="test" value="web.pro.config" xdt:Transform="SetAttributes(value)" xdt:Locator="Match(key)"/>
</appSettings>
标签:.config att value match tin attr debug 替换 --
原文地址:http://www.cnblogs.com/zftylj/p/msbuilder.html