2016-05-23 72 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> 

在我來說,我應該刪除這個字符串。

相關問題