Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Visual Studio ‘Failed to verify module reference’ Authoring SCOM Management Pack, VSAE

Visual Studio ‘Failed To Verify Module Reference’ Authoring SCOM Management Pack, VSAE


Today I’m writing about an elusive problem with a management pack that I was authoring recently. I was writing a generic datasource for a registry discovery; that is a discovery that will instantiate a class based on the existence of a registry key on the Target machine, and generic because I will use a single RegistryProbe datasource for discovery of multiple different class types. (This will save me some time down the road when using the VSAE Discovery template group in Visual Studio). If the registry key exists, the specified class will be discovered. When I attempted to initiate a build (something I do incrementally after minor changes to verify that what I just changed is valid) I encountered an ambiguous error:

------ Build started: Project: WF.Fax, Configuration: Debug x86 ------
     Starting MP Build for WF.Fax.
     Starting Fragment Verification
     Resolving Project References
     Starting Merge Management Pack Fragments
     Starting Pre Processing
     Starting MP Verify

Service ModelClasses.mpx(10,9): warning TypeDefinitionInUnsealedMP: Unsealed management packs should not contain type definitions.  The element WF.Fax.RightFax.Server.Class of type ManagementPackClass found in an unsealed management pack.   (Path = WF.Fax.RightFax.Server.Class)

C:Program Files (x86)MSBuildMicrosoftVSACMicrosoft.SystemCenter.OperationsManager.targets(270,5): error : Failed to verify module reference [Type=ManagementPackElement=System.Discovery.ClassSnapshotDataMapper in ManagementPack:[Name=System.Library, KeyToken=31bf3856ad364e35, Version=7.5.8501.0], ID=Mapping] in the MemberModules list.

: Incorrect XPATH reference: ClassId.
    (Path = WF.Fax.RegistryProbe.Discovery.DS/Mapping)

Done building project "WF.Fax.mpproj" -- FAILED.


========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

There were a few key pieces of info here:

Failed to verify module reference [Type=ManagementPackElement=System.Discovery.ClassSnapshotDataMapper
- This tells me there is something wrong with how I’m using this module.

Incorrect XPATH reference: ClassId
-  This tells me there something wrong with this parameter

(Path = WF.Fax.RegistryProbe.Discovery.DS/Mapping)
-  This tells me where the problem is located: in the ‘Mapping’ section of the ‘WF.Fax.RegistryProbe.Discovery.DS’ module.

I once again visited the MSDN site where I found documentation for the reference module (https://msdn.microsoft.com/en-us/library/ee692953.aspx) and I copied the section of code from the Example into my Visual Studio 2017 SCOM 2016 MP project and BAM! I was able to build it successfully. The code from the example appeared to be absolutely identical to what I had first written.

Here’s what I first used (broken):


    

Share the post

Visual Studio ‘Failed to verify module reference’ Authoring SCOM Management Pack, VSAE

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×