From 25902163ae6264a613260304223cecbbbdc719f0 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Fri, 21 Mar 2025 15:37:47 -0700 Subject: [PATCH 1/5] usepackagetargets updates to #r nuget syntax --- docs/fsharp/tools/fsharp-interactive/index.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index 931a6608b883e..a2bcdd69e640a 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -157,6 +157,15 @@ let f (x: Tensor) = sin (sqrt x) printfn $"{f (dsharp.tensor 1.2)}" ``` +By default ````#r "nuget: ...." ```` will not use build targets from the package being referenced during restore. There is a usepackagetargets open in the ````#r "nuget:```` syntax. +examples: +```` +// load fsharp.data nugetpackage and consume buildtargets from fsharp.data package during restore. +#r "nuget:fsharp.data,usepackagetargets=true" +#r "nuget:fsharp.data,6.6.0,usepackagetargets=false" +#r "nuget:fsharp.data,6.6.0,usepackagetargets=true" +```` +Only add usepackagetargets=true if the package was authored to require it during restore. ### Specifying a package source From 48658a85b5e2dc8c2c00ba3690c547499d2f4ef1 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Fri, 21 Mar 2025 15:50:57 -0700 Subject: [PATCH 2/5] Update index.md --- docs/fsharp/tools/fsharp-interactive/index.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index a2bcdd69e640a..19c1471620a25 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -157,7 +157,7 @@ let f (x: Tensor) = sin (sqrt x) printfn $"{f (dsharp.tensor 1.2)}" ``` -By default ````#r "nuget: ...." ```` will not use build targets from the package being referenced during restore. There is a usepackagetargets open in the ````#r "nuget:```` syntax. +By default ````#r "nuget: ...." ```` will not use build targets from the package being referenced during restore. There is a usepackagetargets option to enable the use of these build targets when required, only add usepackagetargets=true if the referenced package was authored to require it during restore. examples: ```` // load fsharp.data nugetpackage and consume buildtargets from fsharp.data package during restore. @@ -165,8 +165,6 @@ examples: #r "nuget:fsharp.data,6.6.0,usepackagetargets=false" #r "nuget:fsharp.data,6.6.0,usepackagetargets=true" ```` -Only add usepackagetargets=true if the package was authored to require it during restore. - ### 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: From f55b0c6cff3ce6c93366b9de71a55ec408d7abd4 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Fri, 21 Mar 2025 16:04:26 -0700 Subject: [PATCH 3/5] Add usepackagetargets option example in docs --- docs/fsharp/tools/fsharp-interactive/index.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index 19c1471620a25..58c8686d0dfe2 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -157,14 +157,17 @@ let f (x: Tensor) = sin (sqrt x) printfn $"{f (dsharp.tensor 1.2)}" ``` + By default ````#r "nuget: ...." ```` will not use build targets from the package being referenced during restore. There is a usepackagetargets option to enable the use of these build targets when required, only add usepackagetargets=true if the referenced package was authored to require it during restore. examples: -```` + +```fsharp // load fsharp.data nugetpackage and consume buildtargets from fsharp.data package during restore. #r "nuget:fsharp.data,usepackagetargets=true" #r "nuget:fsharp.data,6.6.0,usepackagetargets=false" #r "nuget:fsharp.data,6.6.0,usepackagetargets=true" -```` +``` + ### 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: From 8afebe0c935820f8e01129e485a4949dd8580453 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Fri, 21 Mar 2025 16:09:17 -0700 Subject: [PATCH 4/5] Fix formatting in F# Interactive documentation --- docs/fsharp/tools/fsharp-interactive/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index 58c8686d0dfe2..b2dd695cc2e08 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -158,7 +158,7 @@ let f (x: Tensor) = sin (sqrt x) printfn $"{f (dsharp.tensor 1.2)}" ``` -By default ````#r "nuget: ...." ```` will not use build targets from the package being referenced during restore. There is a usepackagetargets option to enable the use of these build targets when required, only add usepackagetargets=true if the referenced package was authored to require it during restore. +By default ````#r "nuget: ...."```` will not use build targets from the package being referenced during restore. There is a usepackagetargets option to enable the use of these build targets when required, only add usepackagetargets=true if the referenced package was authored to require it during restore. examples: ```fsharp From 1ceb1a14b76985bbe3da91d96085d2f7a3454b26 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 2 Apr 2025 13:15:38 -0400 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/fsharp/tools/fsharp-interactive/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index b2dd695cc2e08..e34b7988efae3 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -158,8 +158,8 @@ let f (x: Tensor) = sin (sqrt x) printfn $"{f (dsharp.tensor 1.2)}" ``` -By default ````#r "nuget: ...."```` will not use build targets from the package being referenced during restore. There is a usepackagetargets option to enable the use of these build targets when required, only add usepackagetargets=true if the referenced package was authored to require it during restore. -examples: +By default, ````#r "nuget: ...."```` doesn't use build targets from the package being referenced during restore. The `usepackagetargets` option enables the use of these build targets when required. Only add `usepackagetargets=true` if the referenced package was authored to require it during restore. +Examples: ```fsharp // load fsharp.data nugetpackage and consume buildtargets from fsharp.data package during restore.