Skip to content

Commit b088fbe

Browse files
committed
Update fsharp-interactive.md
1 parent 48262b0 commit b088fbe

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/docs/examples/fsharp-interactive.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,22 @@ F# Interactive (FSI) is a powerful tool for executing F# code snippets and scrip
1010
2. **Add ModularPipelines to your script:** You can add ModularPipelines as a package reference in your F# script. At the top of your `example.fsx`, add the following line:
1111

1212
```fsharp
13+
1314
#r "nuget: ModularPipelines, 3.*"
15+
1416
```
1517
1618
Alternatively, you can specify a specific version:
1719
1820
```fsharp
21+
1922
#r "nuget: ModularPipelines, 3.2.8"
23+
2024
```
2125
3. **Write your F# code:** Below the package reference, you can write your F# code using ModularPipelines. Here’s a simple example that uses ModularPipelines to check the dotnet version:
2226
2327
```fsharp
28+
2429
#r "nuget: ModularPipelines.DotNet, 3.*"
2530
open ModularPipelines.DotNet
2631
open ModularPipelines.Attributes
@@ -55,11 +60,14 @@ F# Interactive (FSI) is a powerful tool for executing F# code snippets and scrip
5560
builder.Build().RunAsync()
5661
|> Async.AwaitTask
5762
|> Async.RunSynchronously
63+
5864
```
5965
4. **Run your F# script:** You can run your F# script using the F# Interactive environment. If you are using Visual Studio, you can simply open the `example.fsx` file and execute it. Alternatively, you can run it from the command line using:
6066
6167
```powershell
68+
6269
dotnet fsi example.fsx
70+
6371
```
6472
## Additional Notes
6573

0 commit comments

Comments
 (0)