SCOM 2012: Sealing MPs that Reference MPBs


Sealing a SCOM 2012 MP using Visual Studio

If you want to seal an XML MP that references an MPB (management pack bundle), MPSeal.exe won’t work for you.  Instead, you need Visual Studio with the SCOM Visual Studio Extensions (http://www.microsoft.com/en-us/download/details.aspx?id=30169).
  

1.  Open your existing XML in Visual Studio (with the SCOM extensions already installed)

 

2.  Add in any management pack(s)

3. For each reference, provide a path to the MP.

4.  Point Visual Studio to your key file.  *Run sn.exe –k [key name].  See https://msdn.microsoft.com/en-us/library/k5b5tt23(v=vs.110).aspx
for full instructions.

5.  Save the solution.

6.  Hit next and create the project.

7.  To create the MP/MPB, go to Build -> Build Solution

8. Address your errors (I always get them….).   

  a.  In my example, it appears I need to add a reference to System.SNMP.Library.

Error  102    The configuration specified for Module DS is not valid.

: Could not load management pack [ID=System.Snmp.Library, KeyToken=31bf3856ad364e35,Version=7.0.8427.0]. The management pack was not found in the store.

An object of class ManagementPack with name System.Snmp.Library was not found.  (Path = Sample.APC.UPS.Rule.upsAdvBatteryRunTimeRemaining/DS)  C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets  255 6 Sample.APC

  b. Add the file reference

  c.  Now try the build again.

9.  Read the output to see where your MP/MPB ended up:

------ Build started:  Project: Sample.APC, Configuration: Debug x86 ------

       Starting MP Build for Sample.APC.

       Starting Fragment Verification

       Resolving Project References

       Starting Merge Management Pack Fragments

       C:\Program Files (x86)\System Center 2012 Visual Studio Authoring Extensions\Tools\FastSeal.exe C:\Users\niwelch\Desktop\TEst\Sample.APC\obj\Debug\Sample.APC.xml /KeyFile C:\Users\niwelch\Desktop\TEst\Sample.APC\SCOM.snk /Company MyCompany /OutDir C:\Users\niwelch\Desktop\TEst\Sample.APC\obj\Debug\ /Copyright "Copyright (c) MyCompany. All rights reserved."

       Starting MP Verify

       Resolving resources

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

 

And that’s it!

 

Comments (0)

Skip to main content