0
Fixed

Operations cannot be patched

Matthew Clark 7 years ago • updated by anonymous 4 years ago 2

When attempting to test a patch of the PowerShell plugin (new DLL in to the services directory), the service failed to start with the following exception message:

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, Boo
lean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Unify.Product.EventBroker.ExtensibilityPlugInDictionary`4.AddPlugIn(Type a
ssemblyType)
at Unify.Product.EventBroker.ExtensibilityPlugInDictionary`4.InitializeAssemb
lyAttributeDefinition()
at Unify.Product.EventBroker.ExtensibilityPlugInDictionary`4..ctor(DirectoryI
nfo plugInExtensibilityDirectory)
at Unify.Framework.ExtensibilityPlugInGenerator`4..ctor(DirectoryInfo plugInE
xtensibilityDirectory, IValueAdapter`2 nameValueAdapter)
at Unify.Product.EventBroker.OperationPlugInGenerator..ctor()
at Unify.Product.EventBroker.OperationEngine..ctor(IAgentEngine agentEngine,
IGroupEngine groupEngine, IConfigurationEngine configurationEngine, ILicensingEn
gine licensingEngine, INotificationMessageService messageService, IStoredValuesE
ngine storedValuesEngine)
at Unify.Product.EventBroker.OperationEnginePlugInFactory.CreateComponent(IUn
ifyEnginePlugInFactoryInformation factoryInformation)
at Unify.Framework.DependencyPlugInGenerator`4..ctor(ICollection`1 plugInGene
rator, IPlugInFactory`2 factoryInformationFactory)
at Unify.Framework.UnifyEngine..ctor(String sourceNameName, IEnumerable`1 add
itionalPlugInFactories, DirectoryInfo executingAssemblyLocation)
at Unify.Product.EventBroker.EventBrokerServiceEngine..ctor(DirectoryInfo exe
cutingAssemblyLocation)
at Unify.Service.Event.Debug.ProgramProxy.Execute()

It seems that both the embedded and the directory versions of the assembly are being loaded.

I have pushed a fix for this, but have not yet had a chance to confirm.