Web配置多次转换

时间:2016-06-30 12:45:14

标签: asp.net-mvc msbuild web-config-transform

我正在使用MSBuild命令行进行构建,我将Configuration用作Release,但所有配置都已应用。我无法找到问题所在。

我有三种配置 在Web.config

  • Web.Debug.config
  • Web.Live.config
  • Web.Release.config

我正在使用MSBuild

的以下命令
"%MSBuildTools14.0_x64_Path%\MSBuild" %system.teamcity.build.workingDir%\Application\Application.csproj /p:VisualStudioVersion=14.0 /p:Configuration=Release /p:OutputPath=bin

任何帮助都会很明显!!

修改:我在web.config中有一个节点

<connectionStrings configSource="Config\Sql.config" />

我将Web.Release.configWeb.Live.Config覆盖为

<connectionStrings configSource="Config\Sql.Release.config" xdt:Transform="SetAttributes(configSource)" />

<connectionStrings configSource="Config\Sql.live.config" xdt:Transform="SetAttributes(configSource)" />

我在最终Config\Sql.live.config

中获得了Web.Config

所以我认为我正在使用configuration Release,但所有配置都用于转换。

请帮助!

0 个答案:

没有答案