locked
SCOM SDK 2012 R2 RRS feed

  • Question

  • I have couple of question here .

    I could find the resource for SCOM 2012 SDK in MSDN , but do we have any SDK for operational Manger version SCOM 2012 R2 specific.

    If we have from can you please share the link.I would like to know what version of Visual studio do i have to use SCOM 2012 R2 SDK  for build Client Connector.

    If we don't have SDK specific for 2012 R2 , we can SCOM 2012 SDK only . Can I use Visual Studio 2013 for building the code.

    Can you please help me with the answers to above question quickly .


    shiva

    • Moved by ScottMoss Wednesday, September 7, 2016 8:53 PM SDK Question should not be in General
    Wednesday, May 18, 2016 10:52 AM

All replies

  • Hello,

    Visual Studio 2013 supports System Center Operations Manager 2012 and later. You could build the code with VS 2013 for SCOM 2012 R2.

    Regards,

    Yan Li


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, May 19, 2016 1:47 AM
  • If we don't have SDK specific for 2012 R2 , we can SCOM 2012 SDK only . Can I use Visual Studio 2013 for building the code.
    If you want to use Visual stduio to develop SCOM MP, you may download The System Center Visual Studio Authoring Extensions—VSAE, supports Visual studio 2015, 2013 and 2012.
    https://www.microsoft.com/en-us/download/details.aspx?id=30169

    Roger

    Thursday, May 19, 2016 2:40 AM
  • Thanks ,

    I have the connector written using 2007 SDK , Now I am trying to buidl the same code using the SCOM 2012 SDK dll . by replacing the following dll

    1. Microsoft.EnterpriseManagement.OperationsManager.Common.dll
    2. Microsoft.EnterpriseManagement.OperationsManager.dll

    with scom 2012 sdk dlls

    1. Microsoft.EnterpriseManagement.Core.dll
    2. Microsoft.EnterpriseManagement.OperationsManager.dll
    3. Microsoft.EnterpriseManagement.Runtime.dll

    Note :

    I copied the the Operations Manager software development kit (SDK) binaries  located at  %ProgramFiles%\System Center 2012\Operations Manager\Server\SDK Binaries\ folder.

    when I compiled the code using Visual studio 2008 :

    Compilation successful and connector is working fine.

    when I compiled the code using Visual studio 2013 :

    Compilation failed with following error :

    *******************

    c:\spectrum_10.2_vs2013\mom.a\lib\microsoft.enterprisemanagement.core.dll : warning C4945: 'MonitoringTaskCredentials' : cannot import symbol from 'c:\spectrum_10.2_vs2013\mom.a\li
    b\microsoft.enterprisemanagement.core.dll': as 'Microsoft::EnterpriseManagement::Configuration::MonitoringTaskCredentials' has already been imported from another assembly 'Microsof
    t.EnterpriseManagement.OperationsManager'
            c:\spectrum_10.2_vs2013\mom.a\lib\microsoft.enterprisemanagement.operationsmanager.dll : see declaration of 'Microsoft::EnterpriseManagement::Configuration::MonitoringTaskC
    redentials'
            first seen type is used; re-order imported assemblies to use the current type
            This diagnostic occurred while importing type 'Microsoft.EnterpriseManagement.Configuration.MonitoringTaskCredentials' from assembly 'Microsoft.EnterpriseManagement.Core, V
    ersion=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    c:\Spectrum_10.2_VS2013\Mom.a\scom\src\SCOMConnectorMgr.cc(132) : fatal error C1001: An internal error has occurred in the compiler.
    (compiler file 'f:\dd\vctools\compiler\cxxfe\sl\p1\c\esu.c', line 6378)
     To work around this problem, try simplifying or changing the program near the locations listed above.
    Please choose the Technical Support command on the Visual C++

    *******************************************

    The same code is working fine when i compiled using vs 2008 .

    This is code at line 132 :

     mgtGroup = ManagementGroup(scomHost );

    Is it a version compatibilty issue ( .net framework / visual studio )

    Please advise.


    shiva


    • Edited by shiva213 Thursday, May 19, 2016 12:50 PM
    Thursday, May 19, 2016 12:40 PM
  • Folks ... any help on this ..I am stuck on this error . Any clues


    shiva

    Monday, May 23, 2016 4:56 PM
  • Hello,

    According to the error message, 'Microsoft::EnterpriseManagement::Configuration::MonitoringTaskCredentials' has already been imported from another assembly 'Microsoft.EnterpriseManagement.OperationsManager', I would like to suggest you check whether you have both SCOM 2007 and SCOM 2012 SDK dlls loaded.

    Please re-open your VS 2013 and test from the first step and check the result.

    Regards,

    Yan Li


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, May 25, 2016 1:23 AM
  • Hi 

    I have compiled the code on different machine i still see the error when compiling it on VS 2013

    Machine 1:

    VS studio :2013

    SCOM SDK version 2007 used for building connector

    Result : fatal error C1001: An internal error has occurred in the compiler.

    Machine 2 : 

    VS studio 2008

    SCOM SDK version  2007 used for building connector

    Result : Compiled  and connector working.

    Machine 3

    VS studio : 2008

    SCOM SDK version 2012 used for building connector

    Result : Compiled 

    Machine 4

    VS studio : 2013

    SCOM SDK version 2012 used for building connector

    Result : fatal error C1001: An internal error has occurred in the compiler.

    I see the problem onlyu when i build it using VS 2013 . I even installed the The System Center Visual Studio Authoring Extensions—VSAE   , but no luck.


    shiva

    Wednesday, June 1, 2016 5:03 PM
  • Hi,

    I would always suggest to use the latest VS version, which is 2015 at the moment. But it also should work with VS 2013. There is no SCOM 2012 R2 SDK, you can use the SCOM 2012 SDK.

    Tao has big knowledge about the SCOM SDK: http://blog.tyang.org/tag/scom-sdk/. His blog post shows how to call it.

    Natascia

    http://systemcentertipps.wordpress.com

    Thursday, June 2, 2016 1:34 PM
  • Hey ,

    I have started freshly again ,

    1. created a CLR Console Application using 2013 and 2015 on two diferent machines.

    2. Added sample code.

    SCOMConnectorMgr.h

    ************************

    #pragma once
    #using <mscorlib.dll>
    #using <System.dll>
    #using <D:\MOM\System.ServiceModel.dll>
    #using <d:\MOM\Microsoft.EnterpriseManagement.OperationsManager.dll>
    #using <d:\MOM\Microsoft.EnterpriseManagement.Core.dll>
    #using <D:\MOM\Microsoft.EnterpriseManagement.Runtime.dll>

    #include "..\stdafx.h"

    using namespace System;
    using namespace System::Collections::ObjectModel;
    using namespace System::Text::RegularExpressions;
    using namespace System::Threading;
    using namespace System::ServiceModel;
    using namespace Microsoft::EnterpriseManagement;
    using namespace Microsoft::EnterpriseManagement::ConnectorFramework;

    ref class SCOMConnectorMgr
    {
    public:     
        ManagementGroup ^mgtGroup;
        Regex ^regex;
        bool initialize(String ^scomName, String ^connectorName);
        SCOMConnectorMgr();
        ~SCOMConnectorMgr();
    };

    ******************************************************************

    SCOMConnectorMgr.cc

    ******************************************************************

    #include "..\include\SCOMConnectorMgr.h"

    SCOMConnectorMgr::SCOMConnectorMgr()
    {
        ManagementGroup ^mgmtGrp = nullptr;
        
    }

    bool SCOMConnectorMgr::initialize(String ^scomHost,    String ^connectorName)
    {
        bool retVal = true;
        if (true)
        {     
            try
            {
                ManagementGroupConnectionSettings ^settings = gcnew ManagementGroupConnectionSettings(scomHost);
              
                mgtGroup = ManagementGroup::Connect(settings);
                return true;
            }
            catch ( Exception ^e)
            {
            }
        }
        return retVal;
    }

    When i compile the code using VS2013/vs2015 i see following error . .

     d:\mom\microsoft.enterprisemanagement.core.dll: note: This diagnostic occurred while importing type 'Microsoft.EnterpriseManagement.Configuration.MonitoringTaskCredentials' from assembly 'Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    1>src\SCOMConnectorMgr.cc(22): fatal error C1001: An internal error has occurred in the compiler.
    1>  (compiler file 'f:\dd\vctools\compiler\cxxfe\sl\p1\c\esu.c', line 5196)
    1>   To work around this problem, try simplifying or changing the program near the locations listed above.
    1>  Please choose the Technical Support command on the Visual C++
    1>   Help menu, or open the Technical Support help file for more information

    when i build the code on VS 2008 it is compiling. we are planning to go to VS 2013 and need to make this working on VS 2013. I dont want to use the VS 2008/Vs2010.

    Any help on this is appreciated!!!


    shiva




    • Edited by shiva213 Tuesday, June 14, 2016 5:46 AM
    Monday, June 13, 2016 6:02 PM
  • Any comments on above code ????

    shiva

    Wednesday, June 15, 2016 6:44 PM
  • You might want to take a look at the examples of using opsmgr 2012 SDK to make an Operations Manager Connector.

     
    http://systemscenter.ru/scom2012sdk.en/html/hh328935.htm

    I am not sure if you can forklift SCOM SDK code from 2007 into SCOM SDK 2012, but if you run thru the example it might help out. the old 2007 code might be calling a method or something not in 2012. 

    Hope this helps!


    Scott Moss MVP (Operations Manager) Please remember to click “Mark as Answer” on the post that helps you! http://om2012.wordpress.com

    Wednesday, September 7, 2016 8:33 PM