2013-04-27 77 views
0

我已经下载并安装手册中所述的Microsoft Accelerator,但是当我尝试创建使用open Microsoft.ParallelArrays的项目时,ParallelArrays仍未定义。微软加速器库与Visual Studio F#

我试着通过参考将加速器添加到列表中,但似乎无法找到它。

我在做什么错?

编辑:

我发现在不工作的另一个位置的文件,但是当我编译和运行我的测试程序,它抛出的错误

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'Accelerato 
r.dll': The specified module could not be found. (Exception from HRESULT: 0x8007 
007E) 
    at Microsoft.ParallelArrays.FloatParallelArray.AcceleratorNative.Create_FPA_F 
A1D(Single[] values, IntPtr Length) 
    at Microsoft.ParallelArrays.FloatParallelArray..ctor(Single[] values) 
    at Program.Test1() in c:\users\misao\documents\visual studio 2012\Projects\ac 
celeratortest\acceleratortest\Program.fs:line 10 
    at <StartupCode$acceleratortest>[email protected]() in c:\users\misao\documents 
\visual studio 2012\Projects\acceleratortest\acceleratortest\Program.fs:line 97 
Press any key to continue . . . 
+0

您是否这样做 - 添加一个对System.Drawing的引用和受管理的Microsoft.Accelerator.dll(在您的目标的适当目录下,例如C:\ Program Files文件(x86)\ Microsoft \ Accelerator v2 \ bin \ Managed \发布\ Microsoft.Accelerator.dll – 2013-04-27 01:33:53

+0

对不起,我对VS有点新,我该如何添加一个C:\路径作为参考? – misaochan 2013-04-27 01:39:09

+0

参考 - >添加引用 - >浏览 - >浏览 – 2013-04-27 01:41:01

回答

-1

最简单的方法是复制的DLL在您的可执行文件目录仍然是最好的方式,使其工作没有问题给你,尤其是避免可怕的后:“System.DllNotFoundException:无法加载DLL'Accelerato r.dll'”

1

添加dll' Accelerator.dll'来哟你的项目。 右键单击该项目,添加/现有项目。 然后将此文件的“复制到输出”属性设置为“始终复制”。