DeploymentWellKnownProvider Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the list of known deployment provider factories.
public enum class DeploymentWellKnownProvider
public enum DeploymentWellKnownProvider
type DeploymentWellKnownProvider =
Public Enum DeploymentWellKnownProvider
- Inheritance
-
DeploymentWellKnownProvider
Fields
AppHostConfig | 100 | Deployment provider factory for applicationhost.config files. |
AppHostSchema | 200 | Deployment provider factory for applicationhost.config schema files. |
AppPoolConfig | 300 | Deployment provider factory for application pools. |
ArchiveDir | 400 | Deployment provider factory for archive directories. |
Auto | 500 | Automatic deployment provider factory. This provider is only supported as a destination. |
Cert | 600 | Deployment provider factory for certificates. |
ComObject32 | 700 | |
ComObject64 | 800 | |
ContentPath | 900 | Deployment provider factory for filed-based content. |
CreateApp | 1000 | |
DBFullSql | 1200 | Deployment provider factory for SQL Server. |
DBMySql | 1300 | Deployment provider factory for MySQL. |
DirPath | 1100 | |
FilePath | 1400 | |
GacAssembly | 1500 | Deployment provider factory for the global assembly cache. |
IisApp | 1600 | |
MachineConfig32 | 1700 | Deployment provider factory for 32-bit machine.config files. |
MachineConfig64 | 1800 | Deployment provider factory for 64-bit machine.config files. |
Manifest | 1900 | Deployment provider factory for manifests. |
MetaKey | 2000 | Deployment provider factory for metabase updates. |
Package | 2100 | Deployment provider factory for ZIP package files. |
RecycleApp | 2200 | |
RegKey | 2300 | Deployment provider factory for registry keys. |
RegValue | 2400 | Deployment provider factory for registry values. |
RootWebConfig32 | 2500 | Deployment provider factory for 32-bit root web.config files. |
RootWebConfig64 | 2600 | Deployment provider factory for 64-bit root web.config files. |
RunCommand | 2700 | |
SetAcl | 2800 | Deployment provider factory for setting security ACLs. |
Unknown | 0 | |
WebServer | 2900 | Deployment provider factory for IIS 7.0 web servers. |
WebServer60 | 3000 | Deployment provider factory for IIS 6.0 web servers. |
Examples
The following example uses the enumeration DeploymentWellKnownProvider to implement a sync operation with the method SyncTo. DeploymentWellKnownProvider is a safer method of using shipped providers compared to manually inputted strings, which is an offered overload of CreateObject.
Note
The switch
statement helps to demonstrate the various elements in the enumeration
using System;
using Microsoft.Web.Deployment;
namespace MSDeploy.Web.Deployment
{
class Program
{
public enum OSVersion
{
Windows2003,
Windows2008,
}
public enum SyncTypes
{
Content,
File,
Server
}
static void Main(string[] args)
{
string _path = args[0];
OSVersion _osVersion = OSVersion.Windows2003;
SyncTypes _syncType = SyncTypes.Server;
DeploymentWellKnownProvider _provider =
DeploymentWellKnownProvider.Unknown;
switch (_syncType)
{
case SyncTypes.Content:
_provider =
DeploymentWellKnownProvider.ContentPath;
break;
case SyncTypes.File:
_provider = DeploymentWellKnownProvider.FilePath;
break;
case SyncTypes.Server:
if (_osVersion == OSVersion.Windows2003)
{
_provider = DeploymentWellKnownProvider.WebServer60;
}
else if (_osVersion == OSVersion.Windows2008)
{
_provider = DeploymentWellKnownProvider.AppHostConfig;
}
break;
default:
throw new NotImplementedException();
}
DeploymentSyncOptions syncOptions =
new DeploymentSyncOptions();
DeploymentBaseOptions sourceBaseOptions =
new DeploymentBaseOptions();
DeploymentBaseOptions destinationBaseOptions =
new DeploymentBaseOptions();
DeploymentObject deploymentObject =
DeploymentManager.CreateObject(
provider, path, sourceBaseOptions);
deploymentObject.SyncTo(
provider,_path, destinationBaseOptions, syncOptions);
}
}
}
Remarks
This list contains the default provider factories shipped with the Microsft.Web.Deployment
assembly. Additional implementations created by third-parties are not listed in this enumeration.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for