2016-05-23 89 views
1

当我在Visual Studio 2015年做的地方出版它出版的web.config包含:为什么在Web部署之后Visual Studio 2015会更改web.config?

<httpPlatform processPath="..\approot\web.cmd"/> 

和网站工作。但是当我做web部署,它发布web.config其中包含:

<httpPlatform processPath="%home%\site\approot\web.cmd" /> 

,网站无法找到web.cmd,并没有工作。如何在Web部署中使用字符串“.. \ approot \ web.cmd”在web部署中没有%home%的情况下发布项目?

+0

您是如何准确构建项目的?在发布模式? – isxaker

+0

你可以用更多的细节desqribe你的问题? – Mark13

回答

0

一些有用的信息,您可以FID here

在Visual Studio中部署一个ASP.NET核心应用天青应用服务, 它设置一个名为DNU_PUBLISH_AZURE 1环境变量 之前调用DNU发布。这告诉DNU发布到正确填写 值,即:

<httpPlatform processPath="%home%\site\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout.log" startupTimeLimit="3600"></httpPlatform> 

塞汀值0或假变量DNU_PUBLISH_AZURE变回正常路径。

Azure的环境下会开启pubxml在发布配置文件字符串:

<_DestinationType>AzureWebSite</_DestinationType> 

在我来说,我应该删除这个字符串。

相关问题