Failed to load a .NET assembly
11 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Kaustubha Govind
2011 年 8 月 1 日
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 件のコメント
Kaustubha Govind
2011 年 8 月 2 日
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!