When I do local publishing in Visual Studio 2015. It publishes web.config which contains:
<httpPlatform processPath="..\approot\web.cmd"/>
and the website works. But when i do web deploy, it publishes web.config which contains:
<httpPlatform processPath="%home%\site\approot\web.cmd" />
, website could not find web.cmd and doesnt work. How can i publish the project with string "..\\approot\\web.cmd" without %home% in web.config over web deploy?
Some helpful information you can fid here
When Visual Studio deploys an ASP.NET Core app to Azure App Service, it sets an environment variable called DNU_PUBLISH_AZURE to 1 before calling dnu publish. This tells dnu publish to fill in the correct values, which are:
<httpPlatform processPath="%home%\site\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout.log" startupTimeLimit="3600"></httpPlatform>
Seting values 0 or false to variable DNU_PUBLISH_AZURE turns back normal path.
Azure environment turns on in pubxml in publish profiles in string:
<_DestinationType>AzureWebSite</_DestinationType>
In my case i should to remove this string.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.