none
Upgrade from SCOM 2012 R2 to 2016 Fails -> Assembly Not found RRS feed

  • Question

  • Hello everyone,

    I am going through the upgrade process to go from SCOM 2012R2 to 2016. 

    I make it through the pre-installation steps, including selecting "Download the latest updates to the setup program".  The setup program confirms that I have all of the required prerequisites.  I then press the "Upgrade button".....

    "Initial Configuration" -> SUCCESS!

    "Operational Database Configuration" Starts, executes about 14800 commands to the database, and then -> FAILED.  INSTALLATION ABORTED.  Error Message:

    [10:26:08]: Error: :PopulateUserRoles: failed : Threw Exception.Type: System.TypeLoadException, Exception Error Code: 0x80131522, Exception.Message: Could not load type 'SCTrace' from assembly 'Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    [10:26:08]: Error: :StackTrace:   at Microsoft.Mom.Sdk.UserRoleSetup.SetupProgram.populateUserRoles(String adminRoleGroup, String sdkAccount, InstallTypes installType, String installDirectory, Boolean overwriteExistingUsers)
       at Microsoft.EnterpriseManagement.OperationsManager.Setup.ServerConfiguration.PopulateUserRoles(String adminRoleGroup, String sdkAccount, String installDirPath)

    SQL Profiler tells me the last SQL command to run was:

    declare @p1 int
    set @p1=0
    exec AzMan_SPS_Enum_AzAuthorizationStoreUpdateTimeStamp @p1 output,1
    select @p1

    That command was successful, and I was trapping all errors too.

    Obviously I am missing the DLL, or most likely a package of DLLs.  Or perhaps they are not registered correctly....

    I found the DLL here: 

    C:\Windows\assembly\GAC_MSIL\Microsoft.EnterpriseManagement.Core\7.0.5000.0__31bf3856ad364e35\Microsoft.EnterpriseManagement.Core.dll

    I've installed the SDK for Windows 10 as well... no luck.

    Fortunately I made a checkpoint and backed up the databases and rolled back.  I am now back to square 1...

    Any suggestions?

    Thanks!

     
    Tuesday, December 6, 2016 4:47 PM

Answers

  • Well, I finally go this working. Thank you Microsoft, for all of the suggestion you made. (NOT)

    I did a bare-bones installation of SCOM2016 on a fresh server.  Before the installation I ran this PowerShell command:

    [System.Reflection.Assembly]::Load("Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")     

    The result was "Not found".  I then completed the "Management Server" installation and ran the command again.  (After closing and re-opened the PowerShell Interface which is IMPORTANT...)

    GAC=True,Version=v4.0.30319, location=C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.EnterpriseManagement.Core\v4.0_7.0.5000.0__31bf3856ad364e35\Microsoft.EnterpriseManagement.Core.dll

    The server I am trying to upgrade does not have the same version.  So, from the one I did the test install I copied three files to the c:\ of the server I am trying to upgrade:

    C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\C:\Microsoft.EnterpriseManagement.Core.dll

    C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\C:\Microsoft.EnterpriseManagement.OperationsManager.dll

    C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\C:\Microsoft.EnterpriseManagement.Runtime.dll

    Thanks to https://www.andrewcbancroft.com/2015/12/16/using-powershell-to-install-a-dll-into-the-gac/, I made some changes and ran this on the server I am upgrading:

    [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")           
    $publish = New-Object System.EnterpriseServices.Internal.Publish      
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.Core.dll")

    $publish = New-Object System.EnterpriseServices.Internal.Publish      
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.OperationsManager.dll")

    $publish = New-Object System.EnterpriseServices.Internal.Publish      
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.Runtime.dll")

    I then ran the upgrade again, and everything (appears) to be working!

    Wednesday, December 7, 2016 3:49 PM

All replies

  • Also, when I run this in PowerShell it is able to load the Assembly:

    [System.Reflection.Assembly]::Load("Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")      

                                                                                                                                       
    GAC = True

    Version = v2.0.50727

    Location = C:\WINDOWS\assembly\GAC_MSIL\Microsoft.EnterpriseManagement.Core\7.0.5000.0__31bf3856ad364e35\Microsoft.EnterpriseManagement.Core.dll

    Tuesday, December 6, 2016 5:36 PM
  • Well, I finally go this working. Thank you Microsoft, for all of the suggestion you made. (NOT)

    I did a bare-bones installation of SCOM2016 on a fresh server.  Before the installation I ran this PowerShell command:

    [System.Reflection.Assembly]::Load("Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")     

    The result was "Not found".  I then completed the "Management Server" installation and ran the command again.  (After closing and re-opened the PowerShell Interface which is IMPORTANT...)

    GAC=True,Version=v4.0.30319, location=C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.EnterpriseManagement.Core\v4.0_7.0.5000.0__31bf3856ad364e35\Microsoft.EnterpriseManagement.Core.dll

    The server I am trying to upgrade does not have the same version.  So, from the one I did the test install I copied three files to the c:\ of the server I am trying to upgrade:

    C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\C:\Microsoft.EnterpriseManagement.Core.dll

    C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\C:\Microsoft.EnterpriseManagement.OperationsManager.dll

    C:\Program Files\Microsoft System Center 2016\Operations Manager\Server\C:\Microsoft.EnterpriseManagement.Runtime.dll

    Thanks to https://www.andrewcbancroft.com/2015/12/16/using-powershell-to-install-a-dll-into-the-gac/, I made some changes and ran this on the server I am upgrading:

    [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")           
    $publish = New-Object System.EnterpriseServices.Internal.Publish      
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.Core.dll")

    $publish = New-Object System.EnterpriseServices.Internal.Publish      
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.OperationsManager.dll")

    $publish = New-Object System.EnterpriseServices.Internal.Publish      
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.Runtime.dll")

    I then ran the upgrade again, and everything (appears) to be working!

    Wednesday, December 7, 2016 3:49 PM
  • We think this is caused by a reference being left to the Microsoft.EnterpriseManagement.Core.dll in the GAC.

    Upgrading the DLL prior to upgrading should resolve this, but, if this happens again check to make sure this regkey does not exist on the MS:

    HKEY_CLASSES_ROOT\Installer\UpgradeCodes\C96403E8AD6025B4F9E1FE9C574E34AE

    if this doesn't exist, you can still  force the installer to use the local copy of Microsoft.EnterpriseManagement.Core.dll, without modifying the GAC, by enabling this option in SetupChainerUI.exe.config:

    <configuration>
      <runtime>
        <developmentMode developerInstallation="true"/>
      </runtime>
    </configuration>

    Then set the DEVPATH Environment Variable to the location of the SCOM 2016 version of Microsoft.EnterpriseManagement.Core.dll

    eg

    Set DEVPATH=C:\Users\Administrator\AppData\Local\SCOM\Setup\

    If you start setup.exe with this Environment Variable set, it will look for dll's in this folder before it looks in the GAC.

    Friday, December 9, 2016 2:47 AM
  • I just coppied the three dlls from setup folder to C:\ and ran the publish command. After that the installation went ahead without any issues.

    Step 1) Copy below three files to C:\

    C:\System Center Operations Manager\setup\AMD64\Microsoft.EnterpriseManagement.Core.dll

    C:\System Center Operations Manager\setup\AMD64\Microsoft.EnterpriseManagement.OperationsManager.dll

    C:\System Center Operations Manager\setup\AMD64\Microsoft.EnterpriseManagement.Runtime.dll

    Step 2) Execute Below commands

    [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")  

    $publish = New-Object System.EnterpriseServices.Internal.Publish       
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.Core.dll")

    $publish = New-Object System.EnterpriseServices.Internal.Publish       
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.OperationsManager.dll")

    $publish = New-Object System.EnterpriseServices.Internal.Publish       
    $publish.GacInstall("C:\Microsoft.EnterpriseManagement.Runtime.dll")

    Wednesday, January 9, 2019 9:30 AM