System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary


This is an interesting stack:

Detected malicious verification code when verifying element of type Microsoft.EnterpriseManagement.Configuration.ManagementPackRule with inner exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.EnterpriseManagement.Configuration.ManagementPackRule.VerifyDataTypes(Dictionary`2 moduletypes)
at Microsoft.EnterpriseManagement.Configuration.ManagementPackRule.Verify(VerificationContext context)
at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.VerifyCollectionItems(Object context)
: Detected malicious verification code when verifying element of type Microsoft.EnterpriseManagement.Configuration.ManagementPackRule with inner exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.EnterpriseManagement.Configuration.ManagementPackRule.VerifyDataTypes(Dictionary`2 moduletypes)
at Microsoft.EnterpriseManagement.Configuration.ManagementPackRule.Verify(VerificationContext context)
at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.VerifyCollectionItems(Object context

 

Once, it can mean there is wrong base class for the class definition defined. So check all new customizations

I`ve also seen this when trying to delete different notification channels. The issue is the subscribers still have the channel you`re trying to delete defined in them, and therefore the containment relationship is still present. Just reassign subscribers to different or a new channel and try deleting the channel again.

Comments (2)

  1. Anonymous says:

    Hi Silvana, I've come accross this error in a Visual Studio 2013 Solution which as 2 SCOM 2012 Projects. When I try to compile the Project that depends on the other Project, I get siz instances of this error message, with no indication of which MP Snippet
    file has the error.

    Any ideas?

    Thanks,

    David

  2. anonymouscommenter says:

    This post features a new sample management pack bundle that provides a set of wizards to allow the user

Skip to main content