Skip to content

note about fsi extensions #21792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/fsharp/tools/fsharp-interactive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ F# scripting is natively supported in [Visual Studio](../../get-started/get-star

## Referencing packages in F# Interactive

> [!NOTE]
> Package management system is extensible, read more [about other extensions](https://github.com/dotnet/fsharp/tree/main/src/fsharp/Microsoft.DotNet.DependencyManager).

F# Interactive supports referencing NuGet packages with the `#r "nuget:"` syntax and an optional version:

```fsharp
Expand Down Expand Up @@ -128,6 +131,8 @@ You can specify as many package references as you like in a script.
> [!NOTE]
> There's currently a limitation for scripts that use framework references (e.g.`Microsoft.NET.Sdk.Web` or `Microsoft.NET.Sdk.WindowsDesktop`). Packages like Saturn, Giraffe, WinForms are not available. This is being tracked in issue [#9417](https://github.com/dotnet/fsharp/issues/9417).

Read more about [package management extensibility and other extensions](https://github.com/dotnet/fsharp/tree/main/src/fsharp/Microsoft.DotNet.DependencyManager).

## Referencing assemblies on disk with F# interactive

Alternatively, if you have an assembly on disk and wish to reference that in a script, you can use the `#r` syntax to specify an assembly. Consider the following code in a project compiled into `MyAssembly.dll`:
Expand Down