I've created a web deployment package (a ZIP file) for a WCF service hosted in an ASP.NET 4.5 web application. When I try to deploy the package I get the following error:
Child object 'environmentVariables' cannot be added to object 'add'.
The 'add' provider may not support this deployment.
The stack trace is:
Microsoft.Web.Deployment.DeploymentException: Child object 'environmentVariables' cannot be added to object 'add'. The 'add' provider may not support this deployment.
at Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.UI.InstallProgressWizardPage.OnWorkerDoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
I haven't figured out how to fix this problem but I've noticed that the archive.xml in the deployment package ZIP file has an <environmentVariables>
element nested inside an <add>
element which is nested inside an <appPoolConfig>
element.
The source IIS site is in IIS Express (version 10 because I've also installed Visual Studio 2015 RC). The target IIS version is 7.5 (Windows Server 2008 R2).
The web deployment package is created in Visual Studio 2013 running on Windows 7. The installed version of WebDeploy in Programs and Features is 3.6 (3.1238.1953).
Does anyone know how to work around or fix this problem?
Try this :
-skip:objectname=environmentVariables
Example: