I'm adding a third party dll reference to my F# project. I added the dll in references and when I use this i.e highlight the code and do Alt+Ent, I get the error "The namespace or module 'AZROLESLib' not defined." Am I missing some thing.
相关问题
- F#: Storing and mapping a list of functions
- Multiplying a list of tuples by a tuple in F#
- Multiplying a string in F#
- F# odd pattern matching issues
- Why doesn't bindingRedirect affect FSharp.Core
相关文章
- FSharp.Data.JsonProvider - Getting json from types
- Signing an F# Assembly (Strong name component)
- Learning F#: What books using other programming la
- fsc.exe is very slow because it tries to access cr
- Extension methods for specific generic types
- F# Object Initialization with a Constructor
- F# Lazy Evaluation vs Non-Lazy
- When to use interfaces, and when to use higher ord
In my case my F# project was referencing a C# DLL but I had the same issue, "The namespace or module 'MyModule' not defined", when doing "open MyModule".
The solution was to edit the settings to use the same framework (one was using 4.5 and the other 4.0).
In short, you have to use
#r "/path/to/AZROLESLib.dll"
in order that F# Interactive recognizes and loads the dll file.Adding a dll reference helps Visual Studio to find correct libraries when compiling the project, but it has nothing to do with F# Interactive. Therefore, you have to use
#r
directive to point toAZROLESLib.dll
. If VS has some troubles to highlight the code, you may have to open the exact module in your dll file:If the code is in a
*.fs
file, you may want to distinguish between usingfsi
and usingfsc
:for some things you can call them directly by name with no path
works for vs2013 here for instance