I was trying to automate CRM deployment. I tried to use the solution packager and was able with the correct arguments was able to use the extract command and get the file structure out. The Issue I have is when I try to pack the data I get an error stating that the
plugin'RootComponentValidation': An item with the same key has already been added
When I check the log file for details of verbose it gives me
2017-02-24 12:08:45.736 - Verbose Reading: C:\Users\Administrator\Desktop\TestSolutionPackage\SdkMessageProcessingSteps\{9fcadd51-913f-e511-80c8-005056825c44}.xml
2017-02-24 12:08:45.736 - Error Error occurred during execution of plugin 'RootComponentValidation': An item with the same key has already been added.
2017-02-24 12:08:45.736 - Error See log file 'C:\Users\Administrator\Desktop\verbose.txt' for details.
2017-02-24 12:08:45.736 - Error Microsoft.Crm.Tools.SolutionPackager.PluginExecutionException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Crm.Tools.SolutionPackager.Plugins.RootComponentsValidation.GetRootComponents(SolutionInformation solution)
at Microsoft.Crm.Tools.SolutionPackager.Plugins.RootComponentsValidation.BeforeWrite(PluginContext pluginContext)
at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager.<>c__DisplayClassa.<Run>b__4(IPackagePlugin p)
at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager.InvokePlugin(PluginConfigurationElement pluginConfig, Action`1 action)
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager.InvokePlugin(PluginConfigurationElement pluginConfig, Action`1 action)
at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager.Run(IPackageReader reader, IPackageWriter writer)
at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager.Run()
at Microsoft.Crm.Tools.SolutionPackager.Program.Main(String[] args)
2017-02-24 12:08:45.736 - Verbose CrmSvcUtil Runtime = 00:00:02.1380784
The process I went through was export a solution-> extract from zip -> attempt to pack into zip but error gets created