WebDeploy Quick Tip: Deploy without installing the Agent Service

Most people assume they need to install WebDeploy and the Agent Service on all their application servers to use WebDeploy but that is not always the case. 


File Deployments

First, not all deployments require the Agent Service.  For example, the dirPath provider can deploy files to a remote server without using the agent.  It simply uses network file access to deploy the files.  We have used this provider to deploy SSIS packages, Window Services and random file share changes using the AppDeploy Nuget package.  The following blog post provides an example of this process:


IIS Deployments

The agent service is needed for deployments to IIS using the iisApp provider for example.  That doesn’t mean you have to preinstall WebDeploy though. 

WebDeploy supports a tempAgent feature which will install the WebDeploy agent temporarily to support your deployment and then remove the agent.  This requires administrator level access and WMI to be enabled but is a great option if you want to avoid WebDeploy installation on your servers.

There are several options for how the tempAgent can be used.  Read the following documentation for more details –


Happy Deployments!

5 thoughts on “WebDeploy Quick Tip: Deploy without installing the Agent Service”

  1. OK, I got packaging and deployments working with the VSTS task and your nuget AppDeploy package, thanks! The only real problem I ran into was getting it to build with with VS2017 installed (I have both 2015 and 2017 on my desktop).

    On VSTS I just simply targeted VS2015, which is fine for now I guess, but on my desktop I had to add a version param to get it to build the package without errors:

    “C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild” /p:DeployOnBuild=true /p:ImportParametersFiles=true /p:VisualStudioVersion=14.0

    It would complain about missing task dll’s otherwise.

    Do you plan on upgrading to a version of AppDeploy that works with VS2017?

    1. Here’s the error from VSTS using 2017:

      | Build
      2 error(s), 0 warning(s)
      Build – 2 error(s), 0 warning(s)
      TestWinSvc\packages\MSDeployAllTheThings.AppDeploy.1.2.8\tools\AppPublishingPipeline.targets(81):TestWinSvc\packages\MSDeployAllTheThings.AppDeploy.1.2.8\tools\AppPublishingPipeline.targets(81,5): Error MSB4062: The “MSDeploy” task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.Tasks.dll. Could not load file or assembly ‘file:///C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.Tasks.dll’ or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
      Process ‘msbuild.exe’ exited with code ‘1’.

    2. Whoops, I forgot I also had to include the tools version param:

      “C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild” /p:DeployOnBuild=true /p:ImportParametersFiles=true /p:VisualStudioVersion=14.0 /tv:14.0

Leave a Reply