3
votes

I have a 3rd party .dll that I have successfully added as a reference in both a VS 2010 C# project and an F# VS 2010 project. I can view the contents in the object browser in both cases, but the F# version won't let me "open" the library. It works fine in the C# project (with the "using" directive), and I can write a program that uses the contents of this particular .dll. I have not had any trouble with other .dlls in F#/VS 2010/.NET 4.0 on Windows 7.

Any ideas as to why this might be happening? Or how I could debug this further?

2

2 Answers

1
votes

See what the csc.exe and fsc.exe command-lines have for the library in question (in VS, open the 'Output Window' after a rebuild), to see if they both have the same reference (e.g. -r:Path\Library.dll).

And to be clear, you're saying

open NagLibrary

in F# yields the error message in the title, but

using NagLibrary;

in C# works and opens the namespace?

0
votes

make sure you reference the path within the script using the double "\" convention for me this worked

#r "C:\homeware\\blp\\api\\APIv3\\DotnetAPI\\v3.4.5.4\\lib\\Bloomberglp.Blpapi.dll"

open Bloomberglp.Blpapi