title: How do you integrate custom providers into the Microsoft Web Deployment Tool?
body: <p>I am trying to extend the Microsoft Web Deployment tool and MSDeploy with a custom provider because I want to run custom tasks on the destination deployment machine as part of the process. The general documentation is pretty good outside of custom provider development, but the documentation for doing any sort of extension seems to be non-existent towards abysmal.</p>
  
  <p>I've been researching this for several days now and have found some bits and pieces that have allowed me to get pretty far into the process without any real documentation. I've almost hacked my way through the process but now I have one final problem: MSDeploy will not recognize my custom provider.</p>
  
  <p>I have created two classes one that extends Microsoft.Web.Deployment.DeploymentProviderFactory (which has both the Name and FriendlyName properties overriden to the name of my custom provider "archimedes"); the other extends Microsoft.Web.Deployment.DeploymentObjectProvider which also has an overriden Name property "archimedes". I did this by following the custom BatchProvider example you can find online. It looks like this:</p>
  
  <p>ArchimedesProviderFactory (which extends DeploymentProviderFactory and has the Deployment ProviderFactory attribute assigned to the class):</p>
  
  <pre><code>public override string FriendlyName
  {
      get { return "archimedes"; }
  }
  
  public override string Name
  {
      get { return "archimedes"; }
  }
  </code></pre>
  
  <p>The ArchimedesProvider class extends DeploymentObjectProvider and has this:</p>
  
  <pre><code>public override string Name
  {
      get { return "archimedes"; }
  }
  </code></pre>
  
  <p>In my sourcemanifest.xml file I have it added an entry:</p>
  
  <pre><code>&lt;archimedes path="..." /&gt;
  </code></pre>
  
  <p>I have placed the assembly file that contains those classes in %program files%\IIS\Microsoft Web Deploy\Extensibility as I was directed too by the material I found online.</p>
  
  <p>The funny thing is that during the build of a package in Visual Studio 2010, my providers are having code called on them from that directory - so VS is definitely connecting to my assembly placed in there somehow (for example I can throw exceptions and see that they were thrown during the process of building a package).</p>
  
  <p>However during actual test deployment of the package from the generated .cmd file, I get an error that the factory for provider "archimedes" cannot be found. Also typing:</p>
  
  <pre><code>MSDeply -verb:dump -source:archimedes -debug
  </code></pre>
  
  <p>Returns the following:</p>
  
  <pre><code>    Microsoft.Web.Deployment.DeploymentException: Unknown factory 'archimedes'.
     at Microsoft.Web.Deployment.DeploymentProviderSettingCollection..ctor(String factoryName)
     at Microsoft.Web.Deployment.DeploymentProviderOptions..ctor(String factoryName)
     at MSDeploy.MSDeploy.GetObjectParameters(Dictionary`2 parameters, Boolean isDestination, DeploymentBaseOptions&amp; retbaseOptions, DeploymentProviderOptions&amp; re
  tproviderOptions)
     at MSDeploy.MSDeploy.ExecuteWorker()
     at MSDeploy.MSDeploy.Execute()
     at MSDeploy.MSDeploy.Main(String[] unusedArgs)
  Error count: 1.
  </code></pre>
  
  <p>So besides the fact that there appears to be no coherent, central source of documentation for custom provider development (does anyone know of a place, please do tell if you found one), my main problem is that for some reason Visual Studio will see and call my provider factory from the assembly file I dumped into the Extensibility folder, but the actual msdeploy/webdeploy does not see it. Does anyone have any ideas?</p>
  
  <p>Thanks a ton...</p>