Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

$
0
0

Hi guys,

I am trying to load a custom assembly with “SQL Server MDs Workflow Integration”. However, I get the following error:

Error loading workflow type extender:

System.BadImageFormatException: Could not load file or assembly 'WorkflowService' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

File name: 'WorkflowService'

The WorkflowService requires ASP.NET 4.0. But, as you can see in the log bellow here, the .Net v2.0 is loaded instead.

LOG: This bind starts in default load context.

LOG: Using application configuration file: C:\Program Files\Microsoft SQL Server\110\Master Data Services\WebApplication\bin\Microsoft.MasterDataServices.Workflow.exe.Config

LOG: Using machine configuration file fromC:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).

LOG: Attempting download of new URLfile:///C:/Program Files/Microsoft SQL Server/110/Master Data Services/WebApplication/bin/WorkflowService.DLL.

ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.

- I have set the Application pool to v4.0.

- ReInstalled .Net 4.0

- Run the ASPNET_regiis.exe

- I have even added the following settings into web.config with no results:

                <startup>
                                <supportedRuntime version="v4.0" safemode="true"/>
                                <requiredRuntime version="v4.0" safemode="true"/>
                </startup>

Does anyone have experience with this issue?

This is my code:

using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.MasterDataServices.WorkflowTypeExtender; using System.Xml; using System.Data.SqlClient; using System.Diagnostics; namespace MDS { public class WorkflowService : IWorkflowTypeExtender { void IWorkflowTypeExtender.StartWorkflow(string workflowType, XmlElement dataElement) { EventLog.WriteEntry("MDS", "WORKS?", EventLogEntryType.Error); switch (workflowType) { case "BR_Relationship_Default_Items": ExecuteBusinessRule_Items_Defaults(dataElement); break; default: break; } } private void ExecuteBusinessRule_Items_Defaults(System.Xml.XmlElement message) { .....

} } }


Project setting:



Viewing all articles
Browse latest Browse all 1311

Trending Articles