Are you compiling it (building the project)? That should work.
If you are just running it from FSI, then you need to reference DataAccessLayer in the FSI console as well with
#r "DataAccessLayer.dll";;

or whatever the file name is.

:-)

By on 4/23/2010 1:16 AM ()

I am actually trying on a F# library.

So basically, should I write a module or a script?

is #r "DataAccessLayer.dll";; an absolute or relative path?

By on 4/23/2010 2:19 AM ()

I think you're misunderstanding what they're asking you.

Are you starting this up via fsi.exe or are you building it via fsc.exe? Are you firing up some version of the Visual Studio (VS) IDE to work on your code? If you answer those questions I think we could give you better guidance concerning what you need to do.

By on 4/23/2010 8:56 AM ()

Avoiding to double post a doubt, I've been having the same kind of problem trying to use HtmlAgilityPack.

What I've tried:

- With add reference, and using the open statement;

- With the #r directive;

In the first case, it does not recognize the namespace, and in the second, it complains about not being on interactive mode.

I'm using VS 2010, and trying to do a compiled program. Is there anything I'm missing?

Somewhere, I read about using -r, but didn't find a suitable place to add it on VS 2010.

For instance, HtmlAgilityPack is a project hosted on CodePlex for HTML parsing.

If there's something more you need to know, please tell me.

Thanks, Marcelo

By on 4/28/2010 6:16 AM ()

When I create a new F# proj, right click on references, add reference, select the browse tab, pick HtmlAgilityPack.dll, add a line to the code

open HtmlAgilityPack ,

it works fine.

By on 4/28/2010 8:09 AM ()

@mau,

thanks for the reply.

It is not working, but I think I don't have the latest version of it. Will give a (new) try on that, and let you know.

By on 4/28/2010 10:00 AM ()

If you are writing module in F# project you can just add reference to C# library using Visual Studio 'Add Reference...' command

If you are writing script you can use relative path to C# library in #r (or just a library name if the assembly is in the GAC)

Writing a module or a script depends on the goal of your project. You can use script to test functions and algorithms quickly and then wrap up tested functions in the module to build a library.

By on 4/23/2010 5:31 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper