0
の時点では、アプリケーションがのVisual Studio 2015 - 設定の変更または変数公開
を公開または反対THEN IFを実行するための条件のいくつかの並べ替えがありますされ、設定や変数を変更することが可能ですか?
には、例えば、私は私が公開し、私が公開したときに、私は頻繁に変更を加えることを忘れたときに、ログファイルが書き込まれる方法を変更したいこと
の時点では、アプリケーションがのVisual Studio 2015 - 設定の変更または変数公開
を公開または反対THEN IFを実行するための条件のいくつかの並べ替えがありますされ、設定や変数を変更することが可能ですか?
には、例えば、私は私が公開し、私が公開したときに、私は頻繁に変更を加えることを忘れたときに、ログファイルが書き込まれる方法を変更したいこと
Web.Live.Config:
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
-->
<appSettings>
<add key="ClaimPackPath" value="C:\\inetpub\\wwwroot\\Application\\ClaimPacks\\" xdt:Locator="Match(key)" xdt:Transform="Replace" />
</appSettings>
</configuration>
Wg.Debug.Config:
:<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
-->
<appSettings>
<add key="ClaimPackPath" value="C:\\Debug\\wwwroot\\Application\\ClaimPacks\\" xdt:Locator="Match(key)" xdt:Transform="Replace" />
</appSettings>
</configuration>
次に、アプリケーションにあなたがそうのような変数を要求することができます
公開時に選択したパブリッシュプロファイルに変更されます:)
パブリッシュプロファイルを使用して調べましたか? –
私はそれらについていくつか読んだことがあればそれは私が深く掘り下げるでしょう – mreinsmith
彼らは複数のリリース環境を持っているため非常に良いです。私たちが公開プロファイルを使って答えの中の変数を変更する方法のスニペットを以下に示します –