2
我已經創建了一個wpp.targets文件,它可以在azure中執行所有部署。我想在部署到Azure期間更改webconfig的appsetting屬性。我在http://sedodream.com/PermaLink,guid,25ddd39e-59de-4e35-becc-de19dcc5e4ea.aspx中找到了一個示例,它使用pubxml和parameters.xml。我想使用wpp.targets而不是pubxml。如何使用targets.wpp更改Web.Config的應用設置
<appSettings>
<!-- TODO: set this in the azure config -->
<add key="customer" value="xyz" />
</appSettings>
需要在部署和web.config文件中更新客戶價值,以「客戶」應體現在部署文件夾中的更改,如下面
<appSettings>
<add key="customer" value="client" />
</appSettings>
ANSWER
我有在msDeploy中使用ProjectParametersXMLFile
msbuild Api.csproj /p:ProjectParametersXMLFile="c:\parameter.xml"/p:PublishSettingsFile=%publishFileLocation%