私はアプリケーションをCI & Dに設定しています.DDEテスト環境用の接続文字列を含むDEV-Deploy web.configトランスフォームを作成しました。ここでMSBuild 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
deployタスクは、次のようになります。
web.deploy.cmd /Y /M:https://MACHINEIP:8172/msdeploy.axd -allowUntrusted /U:USERNAME /P:PASSWORD /A:Basic
web.configファイルを展開すると次のようになります。
<connectionStrings configSource="connectionStrings.config"></connectionStrings>
私は私のローカルマシン上で私の能力を最大限にテストしていています問題を再現できませんでした。ビルド時にトランスフォームを正しく動作させるには、何が必要ですか?
この質問はプログラミングに関するものではなく間違ったパスであるため、話題にはならないようです(あまりローカライズされていません) – bummi