I am trying to extend the Microsoft Web Deployment and MSDeploy tool 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 the development of custom providers, but the documentation for executing any extensions does not seem to exist in relation to the awful.
I’ve been studying this for several days and found some pieces and pieces that allowed me to go quite far without real documentation. I almost hacked my way in the process, but now I have one last problem: MSDeploy will not recognize my custom provider.
I created two classes, one of which extends Microsoft.Web.Deployment.DeploymentProviderFactory (which has the Name and FriendlyName properties, overriding the name of my custom provider "archimedes"); another extends Microsoft.Web.Deployment.DeploymentObjectProvider, which also has an overridden Name property "archimedes". I did this by running a custom BatchProvider example that you can find on the Internet. It looks like this:
ArchimedesProviderFactory (which extends DeploymentProviderFactory and has the Provider ProviderFactory attribute assigned to the class):
public override string FriendlyName
{
get { return "archimedes"; }
}
public override string Name
{
get { return "archimedes"; }
}
The ArchimedesProvider class extends DeploymentObjectProvider and has the following:
public override string Name
{
get { return "archimedes"; }
}
In my sourcemanifest.xml file, I have an added entry:
<archimedes path="..." />
, % %\IIS\Microsoft Web Deploy\Extensibility, , .
, Visual Studio 2010 , , - VS , - (, , ).
.cmd , factory "archimedes" . :
MSDeply -verb:dump -source:archimedes -debug
:
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& retbaseOptions, DeploymentProviderOptions& re
tproviderOptions)
at MSDeploy.MSDeploy.ExecuteWorker()
at MSDeploy.MSDeploy.Execute()
at MSDeploy.MSDeploy.Main(String[] unusedArgs)
Error count: 1.
, , , , , (- , , , ), , - Visual Studio factory , , msdeploy/webdeploy . - ?
...