Skip to content

Enhancement: scan F# .fsproj projects alongside .csproj and .vbproj #693

Open

Description

@vibgrate-team

Context

The .NET scanner discovers projects with isDotnetProjectFile in src/core-open/scanners/dotnet-scanner.ts (around line 292), which only matches .csproj, .vbproj and .sqlproj. The .sln parsing just below it uses the same three extensions.

F# projects use .fsproj, which is an SDK-style MSBuild file with the same <TargetFramework> / <TargetFrameworks> and <PackageReference> elements. Other parts of the CLI already know about .fsproj (for example src/engine/drift.ts and src/lsp/manifest-positions.ts), but vg scan never picks up F# projects, so their target framework and NuGet dependencies are missing from the scan and the SBOM.

What to do

  • Add .fsproj to isDotnetProjectFile and to the .sln project-entry pattern.
  • Make sure stripDotnetProjectExtension and anything that derives the project name from the file name handles .fsproj.
  • Add a small F# fixture (one .fsproj with a TargetFramework and a couple of PackageReferences, optionally referenced from a .sln) and a test.

Acceptance

  • vg scan on a repository with an .fsproj lists the F# project with its target framework and NuGet dependencies, just like an equivalent .csproj.
  • Directory.Build.props and Directory.Packages.props apply to .fsproj projects the same way they do for C# projects.
  • Existing .csproj, .vbproj and .sqlproj behaviour is unchanged.

Activity

  1. added
    enhancement
    on Nov 18, 2026
  2. vibgrate-team commented on Nov 18, 2026

    @vibgrate-team
    ContributorAuthor

    Good catch: the CLI already knows about .fsproj in src/engine/drift.ts, src/lsp/manifest-positions.ts and src/code/run-outcome.ts, so the scanner is the odd one out.

    Where to make the change:

    • isDotnetProjectFile in src/core-open/scanners/dotnet-scanner.ts (~line 293): add name.endsWith('.fsproj'), and update the doc comment above it.
    • The .sln project-entry regex (~line 709, comment Path.csproj|vbproj|sqlproj): add fsproj to the alternation.
    • stripDotnetProjectExtension, plus any code that picks a language from the extension. src/engine/manifests.ts has its own DOTNET_PROJECT_EXTENSIONS list (~line 344) and a .vbproj → 'vb' mapping (~line 384), so F# needs adding there too, or it will be labelled C#.
    • Worth checking: src/reporting/scanners/platform-matrix.ts (~line 180) only globs .csproj/.vbproj for target frameworks.
    • src/core-open is vendored, so keep the change self-contained there.

    For tests, a tiny fixture is enough: an App.fsproj with <TargetFramework>net8.0</TargetFramework> and two PackageReferences (say FSharp.Core and Newtonsoft.Json), referenced from a .sln. Add a Directory.Packages.props case to confirm central package versions resolve for F# too.

    We're picking this one up and will link the PR here.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions