【发布时间】:2014-11-09 01:21:33
【问题描述】:
我有以下转换文件 app.Release.config 来使用 SlowCheetah 转换我的 app.config。如何从TeamCity 传递BUILD_NUMBER,以便转换文件替换特定的xml 元素值。
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyApp.Data.Model" publicKeyToken="866d4a0fa0599fe0" culture="neutral" />
<bindingRedirect name="MyApp.Data.Model.BR" oldVersion="0.0.0.0-$(BUILD_NUMBER)" newVersion="$(BUILD_NUMBER)" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</dependentAssembly>
</assemblyBinding>
如果我对值进行硬编码,则 SlowCheetah 会进行转换。但是,我不知道如何将build_number 作为参数传递,以便对于每个构建,我都可以替换正确的版本。
【问题讨论】:
标签: xslt visual-studio-2013 msbuild teamcity slowcheetah