我问一个问题,安装F#动力组,并用它here.
错误FS0078:无法找到文件'FSharp.PowerPack.Linq.dll'中的任何一种
/Library/Frameworks/Mono.framework/Versions/2.10.2/lib/mono/2.0
/用户/ smcho /桌面/ FS /动力组
/Users/smcho/smcho/bin/FSharp-2.0.0.0/bin
当我运行此命令 FSC linq.fs /r:FSharp.PowerPack.Linq.dll
,我得到了与单此错误消息。
这似乎与 / R:
,单F#编译器似乎找到
不过,我不想复制所有的DLL在当前目录下,有没有什么办法让单F#和C#编译器知道在哪里可以找到该dll比这两个目录以外的?
看来MONO_PATH和 GACUTIL -i
对查找DLL在运行时,不编译时间。
ADDED
/ I:
选项适用于 FSC
编译
FSC linq.fs /I:/bin/FSharpPowerPack-1.9.9.9/bin/gac /r:FSharp.PowerPack.Linq.dll
解决方案
你就不能使用
-r:/全速/路径/到/的/参考/组装
? (你是正确的,GACUTIL用于运行时组件,而-r是设计时的参考组件,这可能会或可能不会是相同的。)
I asked a question to install F# powerpack and use it here.
error FS0078: Unable to find the file 'FSharp.PowerPack.Linq.dll' in any of
/Library/Frameworks/Mono.framework/Versions/2.10.2/lib/mono/2.0
/Users/smcho/Desktop/fs/powerpack
/Users/smcho/smcho/bin/FSharp-2.0.0.0/bin
When I run this command fsc linq.fs /r:FSharp.PowerPack.Linq.dll
, I got this error message with mono.
It seems that with /r:
, the mono F# compiler seems to find the dll in
However, I don't want to copy all the dll's in the current directory, is there any way to let mono F# or C# compiler know where to find the dll other than those two directory?
It seems that MONO_PATH and gacutil -i
is for finding the dll at runtime, not compile time.
ADDED
/I:
option is available with fsc
compiler.
fsc linq.fs /I:/bin/FSharpPowerPack-1.9.9.9/bin/gac /r:FSharp.PowerPack.Linq.dll
解决方案
Can't you just use
-r:/full/path/to/the/reference/assembly
? (You are right that gacutil is for runtime assemblies, whereas -r is for design-time reference assemblies, which may or may not be the same.)
相关推荐
最新文章