I have a C# dll that I need to reference in F#. I can do this fine in a .fs file, but I can't seem to get it to work in an F# script (.fsx) It is strange because in my script, I have no problem referencing F# dlls. I thought C# dlls and F# dlls were essentially the same.
EDIT:
I have two dlls (1) csharp.dll and (2) fsharp.dll built with csharp and fsharp respectively. I reference them with:
#r "bin\Debug\csharp.dll"
#r "bin\Debug\fsharp.dll"
which the compiler recognizes. The line where this occurs looks like this:
let new_object = new fsharp.type(Observable<csharp.type>)
Where I'm creating an object defined in fsharp.dll which takes an observer of a type defined in csharp.dll. When I try to run it in FSharp interactive, I get the following error:
error FS0074: The type referenced through 'csharp.type' is defined in an assembly that is not referenced. You must add a reference to assembly 'csharp'.
The thing that doesn't make sense is that csharp.type had been used successfully in a previous line. But when we introduce the csharp.type with an fsharp.type, I get an error all of a sudden saying the csharp type is missing an assembly reference, even though the problem seems to be with the fsharp.type.
#rdirective to refer C# dll from the script? - PetrObservable<T>is defined? - Petr#r @"bin\Debug\csharp.dll"- scrwtp