3

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

  1. /Library/Frameworks/Mono.framework/Versions/2.10.2/lib/mono/2.0 <-- mono directory
  2. /Users/smcho/smcho/bin/FSharp-2.0.0.0/bin <-- F# directory
  3. /Users/smcho/Desktop/fs/powerpack <-- current directory.

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
Community
  • 1
  • 1
prosseek
  • 182,215
  • 215
  • 566
  • 871

1 Answers1

1

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.)

Brian
  • 117,631
  • 17
  • 236
  • 300