Skip to main content


 

Symptoms


We are trying to access some management functions. I have a new Visual Studio 2010 C_ project and I include the references to SourceCode.HostClientAPI, SourceCode.Workflow.Client, SourceCode.Workflow.Management, and SourceCode.SmartObjects.Client.

When building the project on my development machine, I receive errors:
The type or namespace name 'Management' does not exist in the namespace 'SourceCode.Workflow' (are you missing an assembly reference?)
The type or namespace name 'SmartObjects' does not exist in the namespace 'SourceCode' (are you missing an assembly reference?)

I believe this has something to do with processor architecture and/or the Global Assembly Cache. When I build the project on the server, I don't get build errors, but I do get warnings about architecture mismatch.
The application also errors out and gives an Exception:
"System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information."

What can I do to resolve these errors?
 

Diagnoses


Mixed mode assembly is built against version ‘v2.0.50727′ of the runtime
 

Resolution

The error received from the server was resolved with the following steps:
Adding ‘useLegacyV2RuntimeActivationPolicy="true"’ the startup node of your App.config per following reference:
http://stackoverflow.com/questions/6425707/mixed-mode-assembly-is-built-against-version-v2-0-50727-of-the-runtime

The error received from the Client was resolved after removing Registry entries and reinstalled K2 Client tools.




 
Be the first to reply!

Reply