I’m adding a library to a project, and I get the following error:
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.
I’m not too sure about what I have to tweak in order fro this to run. Anyone know what the changes should be?
Thanks,
PM
As Marc says, ideally you’d rebuild in .NET 4, or make your project target .NET 3.5 or lower. Mixed-mode assemblies built for the v2 CLR use “legacy” runtime activation techniques which don’t work well with the v4 CLR’s ability to run multiple CLRs in the same process.
Alternatively, you can add this information to your app.config:
See this question, this documentation and this blog post for details.