Bullines
Bullines

Reputation: 5696

Add a Reference Via F#'s Interactive Window

Is it possible to add a reference to a .NET library via F#'s interactive window? For example:

> open System.Xml.Linq;;

  open System.Xml.Linq;;
  ----------------^^^^

stdin(2,17): error FS0039: The namespace 'Linq' is not defined.
> 

Upvotes: 8

Views: 1657

Answers (2)

Roald
Roald

Reputation: 2979

For the people looking to import a non .NET reference. You can do that with:

#r "./path/to/my.dll"

See also this answer.

Upvotes: 0

Daniel Pratt
Daniel Pratt

Reputation: 12077

This seems to work:

> #r "System.Xml.Linq" ;;

Upvotes: 10

Related Questions