Skip to content

Comments

Add #version;; directive to F# Interactive#19332

Open
bbatsov wants to merge 1 commit intodotnet:mainfrom
bbatsov:fsi-version-directive
Open

Add #version;; directive to F# Interactive#19332
bbatsov wants to merge 1 commit intodotnet:mainfrom
bbatsov:fsi-version-directive

Conversation

@bbatsov
Copy link
Contributor

@bbatsov bbatsov commented Feb 19, 2026

Description

Users with multiple F#/SDK/VS installations often need to identify which FSI they're running. The startup banner shows the version, but it scrolls away quickly. This adds a #version;; directive that prints version and environment info on demand — useful for debugging and bug reporting.

Example output:

Microsoft (R) F# Interactive version 12.9.100.0 for F# 9.0
.NET: .NET 9.0.0
OS: Darwin 24.1.0 (Arm64)

Fixes #13307

Checklist

  • Test cases added
  • Performance benchmarks added in case of performance changes
  • Release notes entry updated

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/10.0.300.md

@bbatsov bbatsov force-pushed the fsi-version-directive branch from db76027 to 4b4cfea Compare February 20, 2026 07:12
@T-Gro
Copy link
Member

T-Gro commented Feb 20, 2026

Thank you 👍 .

Two bonus ideas if doable and if you think they are good additions:

The same F# binary can be configured (VS options, directory.props,..) to serve different F# Language version, maybe show that as well?

The same for FSharp.Core version - often not clear where FSharp.Core comes from (from VS, from SDK, from project,...).

From a perspective of a person who reads bugs reports, all of those make sense 👍 .

Prints version, language version, FSharp.Core version, .NET runtime,
and OS/architecture info on demand — useful for debugging and bug
reporting when the startup banner has scrolled away. Closes dotnet#13307.
@bbatsov bbatsov force-pushed the fsi-version-directive branch from 4b4cfea to 1ee5705 Compare February 20, 2026 10:27
@bbatsov
Copy link
Contributor Author

bbatsov commented Feb 20, 2026

Done! I've added both the F# language version and FSharp.Core version to the output. #version;; now prints something like:

Microsoft (R) F# Interactive version 12.9.100.0 for F# 9.0
Language Version: 9.0
FSharp.Core: 9.0.0.0
.NET: .NET 9.0.0
OS: Darwin 24.1.0 (Arm64)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

FSI Interactive directive: #version

2 participants