Search code examples
azure-devopsmsdeployautoreleasems-release-managementazure-pipelines

VSTS: Release Management Deploying Artifacts to IIS on Premise


I am using VSTS Release management to deploy artifacts to IIS websites. I have several Web applications and web services to be deployed. So, i am trying to figure out what sort of tasks that best fits my situation.

I have created a build definition with Visual Studio Build Task for projects as this one: enter image description here

which works fine but i need to add a task for copying the artifacts Under IIS Website Directory.

The other approach is to use IIS web deployment as a task in Release definition, so I created the build definition as:

enter image description here

However, it expects a Publish Profile (the build fails because it can't find it). I don't need to create a publish profile for each project in the application because this would be too much work.

Is there is a workaround for that or what is preferred approach for this?


Solution

  • You can update your build definition to generate a web deployment package and upload it to artifacts. And then in Release Management, add a task to run "projectname.deploy.cmd" in the deployment package to deploy it to your IIS server. Refer to this link for details: How to: Install a Deployment Package Using the deploy.cmd File Created by Visual Studio.

    And you can also enable FTP Publishing on your IIS server and add a task in your release to publish the artifacts via FTP. You may need this task: FTP Uploader.