Why do I get the error "Could not load file or assembly 'MWArray'" when deploying a 32-bit C# application created using MATLAB Builder NE 3.0.2 (R2009b) on a 64-bit Windows?
3 ビュー (過去 30 日間)
古いコメントを表示
I have created a C# application on a 32-bit Windows machine that uses a 32-bit Builder NE component. The application works fine on the development machine.
Now I want to deploy the application on a 64-bit Windows on which I installed the 32-bit version of the MCR.
When I run the application, I get the following error:
Could not load file or assembly 'MWArray, Version=2.9.1.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f' or one of its dependencies. The system cannot find the file specified.
採用された回答
MathWorks Support Team
2010 年 1 月 25 日
Applications created from C# are compiled as managed code, which makes them platform independent (like Java, for example). Thus, when you compile a C# application on a 32-bit machine and then deploy it on a 64-bit machine, it will, by default, try to run as a 64-bit application. Then, it will try to find the 64-bit version of the MWArray.dll, and if it fails, the mentioned error will be shown.
To work around this issue, set the option "Properties -> Build -> Platform target" to "x86" instead of "Any CPU" before compiling your C# application. This will have the effect that the application will start in 32-bit mode on the 64-bit machine.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler SDK についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!