CI&D のアプリケーションをセットアップしています。開発テスト環境の接続文字列を含む DEV-Deploy web.config トランスフォームを作成しました。
Web.DEV-Deploy.config 接続文字列セクションの内容は次のとおりです。
<connectionStrings xdt:Transform="RemoveAttributes(configSource)">
<add name="DbContext"
providerName="MySql.Data.MySqlClient"
connectionString="CXN_STRING"
xdt:Transform="Insert" xdt:Locator="Match(name)"/>
<add name="elmah"
connectionString="CXN_STRING"
xdt:Transform="Insert" xdt:Locator="Match(name)"/>
</connectionStrings>
次のようになります。
<connectionStrings>
<add name="DbContext" providerName="MySql.Data.MySqlClient"
connectionString="CXN_STRING"/>
<add name="elmah" connectionString="CXN_STRING"/>
</connectionStrings>
コマンドラインを使用してビルドしていますが、次のコマンドを試しましたが、どちらも機能しません:
msbuild web\web.csproj /T:Package /P:Configuration=DEV-Deploy /P:TransformConfigFiles=true
msbuild web\web.csproj /T:Package /P:Configuration=DEV-Deploy /t:TransformWebConfig
デプロイ タスクは次のようになります。
web.deploy.cmd /Y /M:https://MACHINEIP:8172/msdeploy.axd -allowUntrusted /U:USERNAME /P:PASSWORD /A:Basic
デプロイ時の web.config は次のようになります。
<connectionStrings configSource="connectionStrings.config"></connectionStrings>
ローカル マシンでできる限りテストを行いましたが、問題を再現することはできませんでした。ビルドで変換を正しく機能させるにはどうすればよいですか?