Deployment of Provider-Hosted App Package on Azure

Provider-Hosted App on Azure 

Step 1:

  • In windows, search for Developer Command Prompt of VS2012.
  • Right click the icon and click on Run as administrator.


  • Here use the msbuild command with the below parameters and values, which will build the solution and create a package.
msbuild ".sln file path" /p:DeployOnBuild=true /p:DeployTarget=Package /p:Configuration=Release /p:PublishProfile=" FTP.pubxml file path"   /p:Password="usrPWD value” /p:AllowUntrustedCertificate=true /p:VisualStudioVersion=12.0
o   msbuild : path to .sln file of your solution
o   DeployOnBuild : true
o   DeployTarget : Package
o   Configuration : Release
o   PublishProfile : path to .pubxml file of FTP settings in ‘Profiles/PublishProfiles’ folder of AppWeb path in solution




o   Password : value of userPWD from .publishSettings file that you have downloaded from azure web app



o   AllowUntrustedCertificate : true
o   VisualStudioVersion = 12.0

Step 2:

  •          Run this command with all filled values in parameters in command prompt.

  •          Build succeeded message would appear once build is done.


Step 3:


  •          Navigate to Package folder in ‘obj/Release’ path of your solution.
  •          Here you would see the contents of the folder like this



  •          Open ‘.SetParameters.xml’ file and apply one change i.e. 


Step 4:

  •          Create a new batch file in the same folder path of the package and write the code in it as below

  •          This file contains command path of .deploy.cmd, publishUrl, UserName, userPWD and a command line to execute this file with this parameter values.

Step 5:


  •          Run this batch file named ‘Azuredeploy.bat’


Note: Microsoft Web Deploy is mandatory for executing this file, if not available in your system (Check in control panel), download and install it from http://www.iis.net/downloads/microsoft/web-deploy

  •          Here running this batch file it would execute msdeploy.exe process and finally deploy the package with all contents to azure.


Comments

Popular posts from this blog

Office365