Skip to content

Support for .slnx solution files #1

@bcrosnier

Description

@bcrosnier

Summary

Visual Studio 2026 (Insiders) now creates .slnx solution files by default.
Currently, TemporarySolutionFile uses Cake.ParseSolution(), which does not support .slnx files. Support is pending in cake-build/cake#4521 and will only be available after the next Cake.Common NuGet release.

Details

Microsoft now provides Microsoft.VisualStudio.SolutionPersistence (NuGet).
This package:

  • Has no external dependencies (for net8.0 and above, at least).
  • Can load both .sln and .slnx files into its model.
  • Can save solutions as either format.

Initial testing with @cheng-atf confirms it works as expected. Projects can be loaded and mapped into Cake's solution model with minimal effort.
However, TemporarySolutionFile is still used in CCBs during build for project exclusion.

Options

  1. Wait for Cake's first-party .slnx support and continue to use Cake.ParseSolution().
  2. Bypass Cake.ParseSolution() and adopt Microsoft.VisualStudio.SolutionPersistence, re-implementing ITemporarySolutionFile either in this repo or within CCBs.

Current Workaround

We currently save .sln files instead of .slnx in repositories.
Visual Studio 2026 allows "File -> Save As" to convert between formats.

Constraints

  • The .NET SDK version on the build machine determines compatibility.
  • .slnx files require the .NET 9.0.200 SDK or later.

Request

Add support for .slnx files in TemporarySolutionFile, either by integrating Microsoft's SolutionPersistence package or by adopting Cake's native support once released.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions