Failed to load a .NET assembly
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
When I try to load a .NET assembly by typing:
asm = NET.addAssembly('fullPath');
I get the following error: "Could not load file or assembly 'file:///fullPath' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. Source: mscorlib HelpLink:"
I've Matlab R2010a and the assembly is targeted for .NET framework 4.0.
0 Commenti
Risposte (1)
Kaustubha Govind
il 1 Ago 2011
What version of MATLAB did you use to build your .NET assembly? The latest version (R2011a) supports .NET Framework 4.0: http://www.mathworks.com/products/netbuilder/requirements.html, but I know that older releases used older .NET versions. You might need to build with a newer version to load your assembly with 4.0.
2 Commenti
Kaustubha Govind
il 2 Ago 2011
Oops. Apologies! I misunderstood your question.
The issue you are facing has been documented at http://www.mathworks.com/support/solutions/en/data/1-CNPYZV/index.html
So it looks like you will need to upgrade to R2011a to be able to use .NET 4.0 assemblies.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!