Error when building SCOM 2012 management packs with MSBuild RRS feed

  • Question

  • I have a Visual Studio 2012 solution with multiple management packs in it. Everything works fine when I build it in Visual Studio. When I'm building it running msbuild in VS2012 Native Tools Command Prompt everything works fine too. The problem appears when I'm trying to build it using an msbuild from regular cmd.

    So, at first, I was getting multiple errors (for every management pack in solution):

    C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets(210,5): error MSB4018: The "VerifyManagementPackFragment" task failed unexpectedly.\r [D:\Desktop\scom_managementpacks\2012\Zabbix.Linux.Library\Zabbix.Linux.Library.mpproj]C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets(210,5): error MSB4018: System.IO.FileNotFoundException: Could not find file 'D:\Desktop\scom_managementpacks\2012\WK.Zabbix.Linux.Library\FragmentSchemaOM20.xsd'.\r [D:\Desktop\scom_managementpacks\2012\Zabbix.Linux.Library\Zabbix.Linux.Library.mpproj]C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets(210,5): error MSB4018: File name: 'D:\Desktop\scom_managementpacks\2012\Zabbix.Linux.Library\FragmentSchemaOM20.xsd'\r [D:\Desktop\scom_managementpacks\2012\Zabbix.Linux.Library\Zabbix.Linux.Library.mpproj]

    After I put FragmentSchemaOM20.xsd (I took it from VSAE installation) to location I started getting the following error:

    01.MPName.mpx(2729,20): error : Undefined complexType 'http://schemas.microsoft.com/maml/2004/10:sectionsType' is usedas a base for complex type restriction. [D:\Desktop\scom_managementpacks\2012\Zabbix.Linux.Library\Zabbix.Linux.Library.mpproj]

    The thing is there's MPName.mpx file has only 11 lines. I did some investigation and found out that actually, this error is pointing to FragmentSchemaOM20.xsd that I put to the folder.

    How can I fix this? What is the proper way to build management packs with msbuild?

    I've tried to build the whole solution pointing to .sln file and a separate project, pointing to a single .mpproj file. Example command:

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe /t:Build D:\Desktop\scom_managementpacks\2012\Apache.WebServer.Discovery.And.Monitoring\Apache.WebServer.Discovery.And.Monitoring.mpproj

    Thursday, January 26, 2017 9:07 AM

All replies