Use ManagedCode.Communication when a .NET application needs explicit result objects, structured errors, and predictable service or API boundaries instead of exception-driven…
F# Interactive
Use F# Interactive (`dotnet fsi`) for .NET exploration, scriptable experiments, package-backed .fsx workflows, quick data transforms, and reproducible command-line probes. USE FOR: .fsx scripts, F# REPL work, #r nuget references, #load composition, interactive type exploration, and small strongly typed experiments before moving code into a project. DO NOT USE FOR: production application code that needs compiled project structure; C# scripting; long-lived automation better expressed as a normal CLI, test, or build target. INVOKES: run dotnet fsi, edit .fsx scripts, load project or source files, and validate snippets against the target SDK.
Trigger On
- the task asks for F# Interactive, FSI,
.fsx, ordotnet fsi - a quick typed experiment is needed before changing compiled project code
- a script should reference NuGet packages directly with
#r "nuget: ..." - an investigation needs quick access to F# type inference, pattern matching, or pipelines
- a repeatable one-file probe is better than a temporary project
Workflow
- Decide whether the request is a disposable REPL probe, a repeatable
.fsxscript, or code that should be promoted to a compiled F# project. - Put repeatable work in an
.fsxfile immediately. Add all required#r,#load,open, input path, and package source directives to the script instead of relying on hidden REPL state. - Keep package references pinned when the script should be reproducible, and use only trusted NuGet feeds or local feeds derived from
__SOURCE_DIRECTORY__. - Run the script with
dotnet fsifrom a clean shell, passing the same arguments the user or CI will use. - Promote the script to an
.fsprojwhen it needs tests, distribution, project references, or long-term CI coverage.
Validate
Use the simplest command that proves the script still runs:
dotnet fsi scripts/check.fsx
dotnet fsi scripts/check.fsx -- arg1 arg2
For scripts that reference packages, run from a clean shell at least once so hidden REPL state cannot mask missing #r, #load, or open directives.
Related skills
Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses.
Use the Microsoft.Extensions stack correctly across Generic Host, dependency injection, configuration, logging, options, HttpClientFactory, and other shared infrastructure…