Issue
Can ASP.NET Core apps be deployed via msdeploy.exe and a .pubxml definition similar to what was possible for pre-.NET Core? This is the command that I've used previously:
msbuild myproj.csproj /p:DeployOnBuild=true /p:PublishProfile=<profile-name>
.
If not, what is the preferred way to deploy an ASP.NET Core app from the command line?
Solution
To deploy your asp.net core app to Azure web App simply do the following steps:
1. dotnet publishsomeproject.csproj -c release -o someDirectory
2. msdeploy.exe -verb:sync -source:contentPath="someDirectory" -dest:contentPath="webAppName",ComputerName="https://WebAppName.scm.azurewebsites.net/msdeploy.axd",UserName="username",Password="password",IncludeAcls="False",AuthType="Basic"
-enablerule:AppOffline -enableRule:DoNotDeleteRule -retryAttempts:20 -verbose
Username and Password can be retrieved or set on the deployment preview section in the web app in Azure portal. I have set an env path for my msdeploy.exe
which can be found usually here C:\Program Files\IIS\Microsoft Web Deploy V3
.
Answered By - Buba Conteh Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.