2

While invoking MSDeploy to deploy a webpackage to a remote computer, we're getting the following error:

msdeploy.exe -source:package='G:\workspace\webPackage\WebPackage.zip' -dest:auto,computerName="HOST",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"G:\workspace\webPackage\SetParameters.xml" 
Error: (12/10/2015 2:55:36 PM) An error occurred when the request was processed on the remote computer.
Error: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Web.Deployment.DeploymentManager.SanitizePath(DeploymentProviderOptions providerOptions)
at Microsoft.Web.Deployment.DeploymentAgentWorkerRequest.GetTraceMessage(String[] additionalMessage)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequestWorker(DeploymentAgentAsyncData asyncData)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData)
at Microsoft.Web.Deployment.DeploymentAgent.BeginProcessRequest(DeploymentAgentWorkerRequest workerRequest, AsyncCallback callback, Object extraData)

This looks to be happening somewhere in the depths of MSDeploy. The weird thing is that it doesn't happen consistently; running this command again seems to work. Any thoughts?

1 Answers1

0

Do you have any duplicate items in your package?

https://forums.iis.net/t/1149928.aspx?An+item+with+the+same+key+has+already+been+added+

Upon one-click publish: Exception in executing publishing: An item with the same key has already been added

Community
  • 1
  • 1
Randy
  • 2,270
  • 1
  • 15
  • 24
  • I can double check, but we are deploying this package to multiple machines and this only happens on one at a time (and not always the same one). – SolsticeShard Dec 10 '15 at 21:44
  • Does anything change when you deploy from one machine to another? Maybe some config files? – Randy Dec 10 '15 at 21:47
  • Nope, we're doing sequential invocations of MSDeploy. Interestingly enough, it only seems to happen on the first invocation. – SolsticeShard Dec 10 '15 at 22:51