Skip to content

feat: add .slnx solution format support#110

Open
idg2 wants to merge 1 commit intosourcegraph:mainfrom
idg2:feat/slnx-support
Open

feat: add .slnx solution format support#110
idg2 wants to merge 1 commit intosourcegraph:mainfrom
idg2:feat/slnx-support

Conversation

@idg2
Copy link
Copy Markdown

@idg2 idg2 commented Apr 11, 2026

Summary

Add support for the XML-based .slnx solution format introduced in .NET 9 / Visual Studio 17.10.

  • Upgrade Roslyn from 4.4.0 to 5.3.0MSBuildWorkspace.OpenSolutionAsync() gained native .slnx support in Roslyn 5.0.0+ (dotnet/roslyn#77326)
  • Add .slnx to auto-discoveryFindSolutionOrProjectFile now finds .slnx files alongside .sln
  • Add .slnx to restore and loading — solution restore and OpenSolutionAsync paths treat .slnx same as .sln
  • Drop net6.0/net7.0 TFMs — Roslyn 5.x requires net8.0+; both .NET 6 and 7 are end-of-life
  • Add snapshot test — new syntax-slnx test fixture validates SCIP indexing via .slnx
  • Bump version to 0.2.14

Motivation

The .slnx format is the default for dotnet new sln in .NET 10 and is increasingly adopted in modern .NET projects. Without this change, scip-dotnet cannot index codebases that use .slnx, requiring manual workarounds (passing individual .csproj files instead).

Changes

File Change
ScipDotnet.csproj Roslyn 4.4.0 → 5.3.0, TFMs trimmed to net10.0/net9.0/net8.0, version bump
IndexCommandHandler.cs .slnx added to auto-discovery filter + error messages
ScipProjectIndexer.cs .slnx treated as solution file for restore and loading
Program.cs Help text updated
ScipDotnet.Tests.csproj TFMs aligned
snapshots/input/syntax-slnx/ New test fixture with .slnx format

Test plan

  • Existing syntax snapshot test passes (.sln path unchanged)
  • New syntax-slnx snapshot test passes (.slnx auto-discovered and indexed)
  • Manual validation: indexed a real-world .slnx with 5 projects — produced 2.3MB SCIP index

🤖 Generated with Claude Code

Upgrade Roslyn from 4.4.0 to 5.3.0 to enable MSBuildWorkspace.OpenSolutionAsync()
to parse the XML-based .slnx format introduced in .NET 9 / VS 17.10.

Changes:
- Bump Microsoft.CodeAnalysis.* packages from 4.4.0 to 5.3.0
- Bump System.Configuration.ConfigurationManager from 7.0.0 to 9.0.0
- Add .slnx to auto-discovery, restore, and solution loading checks
- Drop net6.0/net7.0 TFMs (Roslyn 5.x requires net8.0+; both are EOL)
- Bump version to 0.2.14
- Add snapshot test using .slnx format

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@slang25
Copy link
Copy Markdown

slang25 commented Apr 11, 2026

This looks good, I'll close my PR over here: #100

I'm not sure that the sourcegraph folks are looking at these PRs since the reshuffle, hopefully they eventually do 🤞

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants