From: Iyappan on
Hi Brian,

I am facing the exact situation that you described in your posting? Were you able to find an answer to your question?

Regards,
Iyappan

------------------------------
"Brian " <brian.tollins(a)selexgalileo.com> wrote in message <hb78i1$ppa$1(a)fred.mathworks.com>...
> I have been using the new matlab/.NET interface added to r2009a.
>
> It all works fine with some .NET assemblies I generated, which target .NET framework 2.0.
>
> However, I also have some WPF code, created using Visual Studio 2010 Beta, which targets .NET 4.0 Beta.
>
> When I try to load these assemblies (using NET.addAssembly), matlab falls over with the following error (an extract is given below):
>
> ..."the assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."
>
> I think this may be due to matlab automatically loading system and mscorlib from Framework 2.0 at startup, and hence not allowing newer assemblies to be loaded into the framework 2.0.
>
> I guess my question is really: can I use .NET Framework 3.5 / 4.0 applications in matlab?
>
> If so how? If not, will matlab add that functionality at a later date.
>
> Can I stop matlab loading system and mscorlib at startup, and instead load my 4.0 system and mscorlib framework assemblies manually?
>
> Any information or help would be appreciated.
>
> Thanks,
> Brian