locked
PowerShell workflows still erroring after SP1 fix RRS feed

  • Question

  • I recently built a new development environment with SP1 media, and at build time, I went ahead and applied this fix, http://www.systemcenterservicemanager.co.uk/SCSM/service-manager-2012-sp1-rtm-workflow-powershell-fix/

    But upon importing my Workflow MP, the workflows are still erroring:

    System.Exception: Loading managed module type in assembly "Microsoft.EnterpriseManagement.Modules.PowerShell, Culture="", PublicKeyToken=31bf3856ad364e35, Version=6.0.4900.0" with type name "Microsoft.EnterpriseManagement.Modules.PowerShell.PowerShellProbeActionModule" failed with error "The module assembly "Microsoft.EnterpriseManagement.Modules.PowerShell, Culture="", PublicKeyToken=31bf3856ad364e35, Version=6.0.4900.0" could not be loaded.  The exception was: \nCould not load file or assembly 'Microsoft.EnterpriseManagement.Modules.PowerShell, Version=6.0.4900.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).".
    
    
    
    This may be because the type or assembly could not be found or the type does not have the MonitoringModuleAttribute.
    
    
    
    Workflow: CRPostApprovalWorkFlow.WindowsPowerShellScript.9b94a6f2_bdf8_4dd4_aae0_a9315eb5f297
    
    Instance: SCSM02
    
    Instance ID: {33621AD1-1E38-D516-BD3D-B11910848594}
    
    Management Group: SM
    
    Full Exception Text:
    
    
    Microsoft.EnterpriseManagement.HealthService.HealthServiceException: The module assembly "Microsoft.EnterpriseManagement.Modules.PowerShell, Culture="", PublicKeyToken=31bf3856ad364e35, Version=6.0.4900.0" could not be loaded.  The exception was: \nCould not load file or assembly 'Microsoft.EnterpriseManagement.Modules.PowerShell, Version=6.0.4900.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040). ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.EnterpriseManagement.Modules.PowerShell, Version=6.0.4900.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'Microsoft.EnterpriseManagement.Modules.PowerShell, Version=6.0.4900.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Microsoft.EnterpriseManagement.HealthService.Internal.ManagedHostHelper.LoadModuleType(String moduleAssemblyName, String moduleTypeName)
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    
       --- End of inner exception stack trace ---
       at Microsoft.EnterpriseManagement.HealthService.Internal.ManagedHostHelper.LoadModuleType(String moduleAssemblyName, String moduleTypeName)
       at Microsoft.EnterpriseManagement.HealthService.Internal.ManagedHostHelper.Microsoft.EnterpriseManagement.HealthService.Internal.IManagedHostHelper.LoadAndInitializeModule(String moduleAssemblyName, String moduleTypeName, UInt32 countInputPorts, Boolean doesModuleHaveOutput, String configuration, Byte[] stateBlock, UInt32 stateBlockLength, Object& moduleReference, Object& moduleInputReference, Object& moduleInputBatchedReference)
    
       at Microsoft.ServiceManager.WorkflowAuthoring.ActivityLibrary.WindowsPowerShellScript.Activity_Closed(Object sender, ActivityExecutionStatusChangedEventArgs e)
       at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
       at System.Workflow.Runtime.Scheduler.Run()

    And here is my monitoringhost.exe.config

    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </configSections>
      <uri>
        <iriParsing enabled="true" />
      </uri>  
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.Mom.Modules.DataTypes" publicKeyToken="31bf3856ad364e35" />
            <publisherPolicy apply="no" />
            <bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation" publicKeyToken="31bf3856ad364e35" />
            <publisherPolicy apply="no" />
            <bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />
          </dependentAssembly>
          <publisherPolicy apply="yes" />
          <probing privatePath="" />
        </assemblyBinding>
        <gcConcurrent enabled="true" />
      </runtime>
    </configuration>
    
    

    Not sure what the issue could be....  Unless the there is something wrong with the config file?

    Any ideas?


    Joshua Fuente

    Friday, March 22, 2013 12:29 PM

Answers

All replies