首页 > 代码库 > 自动构建部署

自动构建部署

--满足条件,替换为正式环境的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="http://www.mamicode.com/web.pro.config" xdt:Transform="SetAttributes(value)" xdt:Locator="Match(key)"/>

</appSettings>

自动构建部署