我使用MATLAB .Net Builder生成了一個.Net庫。我設法在C#中沒有任何問題的情況下使用它,但我正在嘗試使用在F#Interactive中創建的快速F#包裝器進行一些測試。無法將MWArray.dll綁定到F#Interactive
事情是,我似乎無法使用F#Interactive中的MWArray
類。
我設法使用#r
命令引用DLL,但在open
命令後面使用intellisense時找不到MathWorks
域。
而且,如果我跑我的代碼,我得到以下錯誤,當流遇到MWArray
:跟着
Binding session to 'C:\Program Files\mypath\bin\Debug\MWArray.dll'...
通過
error FS0193: internal error: Could not load file or assembly 'file:///C:\Program Files\mypath\bin\Debug\MWArray.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. System.IO.FileNotFoundException: Could not load file or assembly 'MWArray, Version=2.11.0.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f' or one of its dependencies. The system cannot find the file specified. File name: 'MWArray, Version=2.11.0.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f' (...) at [email protected]() in C:\Program Files\mypath\ScriptTest.fsx:line 49
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stopped due to error
我真的不知道在哪裏這個來自和如何解決問題。
有沒有人成功地使用F#中的MATLAB .Net庫?
你有什麼建議可以幫我解決我的問題嗎?