From ad6b953e32c1b3dda2513e080713169a3da3302f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:23:14 +0000 Subject: [PATCH 1/5] Initial plan From 4ca48460f1f63a0f2f417774ada7d2c72ac52853 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:32:22 +0000 Subject: [PATCH 2/5] Add clarification about relative paths in F# Interactive #i directive Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/fsharp/tools/fsharp-interactive/index.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index e34b7988efae3..07e18635cdfa2 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -170,16 +170,21 @@ Examples: ### Specifying a package source -You can also specify a package source with the `#i` command. The following example specifies a remote and a local source: +You can also specify a package source with the `#i` command. The following examples specify a remote source and local sources on different operating systems: ```fsharp #i "nuget: https://my-remote-package-source/index.json" #i """nuget: C:\path\to\my\local\source""" +#i "nuget: /Users/username/path/to/my/local/source" +#i "nuget: /home/username/path/to/my/local/source" ``` -This will tell the resolution engine under the covers to also take into account the remote and/or local sources added to a script. +This tells the resolution engine to take into account the remote and/or local sources added to a script. -You can specify as many package references as you like in a script. +You can specify as many package sources as you like in a script. + +> [!IMPORTANT] +> Relative paths aren't currently supported with the `#i` directive. You must use absolute paths for local package sources. This limitation is tracked in [dotnet/fsharp#12969](https://github.com/dotnet/fsharp/issues/12969). As a workaround, construct absolute paths programmatically using `__SOURCE_DIRECTORY__` combined with `System.IO.Path.Combine()`, and then manually specify the full absolute path in your 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). From f614f64eb36476a17414afa980ecdc8e7083164c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:35:12 +0000 Subject: [PATCH 3/5] Update frontmatter with AI usage and current date Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/fsharp/tools/fsharp-interactive/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index 07e18635cdfa2..e50d928b793e0 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -1,9 +1,10 @@ --- title: F# Interactive (dotnet) Reference description: Learn how F# Interactive (dotnet fsi) is used to run F# code interactively at the console or to execute F# scripts. -ms.date: 11/29/2020 +ms.date: 10/13/2025 f1_keywords: - VS.ToolsOptionsPages.F#_Tools.F#_Interactive +ai-usage: ai-assisted --- # Interactive programming with F\# From 05163713b1a691e3d24eb2c96b1ba9688a75a141 Mon Sep 17 00:00:00 2001 From: David Pine Date: Thu, 16 Oct 2025 08:04:07 -0500 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/fsharp/tools/fsharp-interactive/index.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index e50d928b793e0..b40a13efd41dc 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -171,7 +171,7 @@ Examples: ### Specifying a package source -You can also specify a package source with the `#i` command. The following examples specify a remote source and local sources on different operating systems: +You can also specify a package source with the `#i` command. The following examples specify remote and local sources: ```fsharp #i "nuget: https://my-remote-package-source/index.json" @@ -185,8 +185,15 @@ This tells the resolution engine to take into account the remote and/or local so You can specify as many package sources as you like in a script. > [!IMPORTANT] -> Relative paths aren't currently supported with the `#i` directive. You must use absolute paths for local package sources. This limitation is tracked in [dotnet/fsharp#12969](https://github.com/dotnet/fsharp/issues/12969). As a workaround, construct absolute paths programmatically using `__SOURCE_DIRECTORY__` combined with `System.IO.Path.Combine()`, and then manually specify the full absolute path in your script. - +> Relative paths aren't currently supported with the `#i` directive. You must use absolute paths for local package sources. This limitation is tracked in [dotnet/fsharp#12969](https://github.com/dotnet/fsharp/issues/12969). +> +> **Workaround:** You can programmatically construct an absolute path using `__SOURCE_DIRECTORY__` and `System.IO.Path.Combine()`, then use string interpolation to pass it to the `#i` directive. For example: +> +> ```fsharp +> let localSource = System.IO.Path.Combine(__SOURCE_DIRECTORY__, "relative/path/to/my/local/source") +> #i $"""nuget: {localSource}""" +> ``` +> > [!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). > WinForms, still works in the .NET Framework version of F# Interactive. From 40fe633e32308aaa4b984106de21f1d392954f50 Mon Sep 17 00:00:00 2001 From: David Pine Date: Thu, 16 Oct 2025 08:09:36 -0500 Subject: [PATCH 5/5] Fix formatting and clarify package source instructions --- docs/fsharp/tools/fsharp-interactive/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index b40a13efd41dc..fc75275801f3e 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -185,15 +185,15 @@ This tells the resolution engine to take into account the remote and/or local so You can specify as many package sources as you like in a script. > [!IMPORTANT] -> Relative paths aren't currently supported with the `#i` directive. You must use absolute paths for local package sources. This limitation is tracked in [dotnet/fsharp#12969](https://github.com/dotnet/fsharp/issues/12969). -> +> Relative paths aren't currently supported with the `#i` directive. You must use absolute paths for local package sources. This limitation is tracked in [dotnet/fsharp#12969](https://github.com/dotnet/fsharp/issues/12969). +> > **Workaround:** You can programmatically construct an absolute path using `__SOURCE_DIRECTORY__` and `System.IO.Path.Combine()`, then use string interpolation to pass it to the `#i` directive. For example: -> +> > ```fsharp > let localSource = System.IO.Path.Combine(__SOURCE_DIRECTORY__, "relative/path/to/my/local/source") > #i $"""nuget: {localSource}""" > ``` -> +> > [!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). > WinForms, still works in the .NET Framework version of F# Interactive.