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.
Right-click on References and select Add Reference... This will bring up the Add Reference dialog. Click on the Browse tab then navigate to the DLL you want to reference and click Ok to add the reference to your Project.
Third party DLLs are libraries created by other organisation outside of yours. You can use these third party DLLs by putting them into a folder in your solution and then creating a reference to it (Project-> Right Click-> Add Reference). Once you have the DLL, that DLL will have a namespace.
1 right click on References in Solution Explorer and press add reference... 2 choose the browse tab and go to C:\Windows\assembly\GAC_32\System. Web\System.
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 to AZROLESLib.dll
. If VS has some troubles to highlight the code,
you may have to open the exact module in your dll file:
open AZROLESLibModule
If the code is in a *.fs
file, you may want to distinguish between using fsi
and using fsc
:
#if INTERACTIVE
#r "/path/to/AZROLESLib.dll"
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With