Skip to content

Migrate to .slnx solution file using dotnet sln migrate#207

Merged
BenjaminMichaelis merged 3 commits intomainfrom
copilot/fix-f94c5a88-73f1-474e-882b-5a11c789a524
Oct 6, 2025
Merged

Migrate to .slnx solution file using dotnet sln migrate#207
BenjaminMichaelis merged 3 commits intomainfrom
copilot/fix-f94c5a88-73f1-474e-882b-5a11c789a524

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 6, 2025

This PR migrates the repository to use the new .slnx (XML-based solution) file format for improved compatibility with modern .NET tooling and Visual Studio.

Changes

  • Generated EssentialCSharp.ListingManager.slnx using the dotnet sln migrate command
  • Removed the legacy EssentialCSharp.ListingManager.sln file to avoid CI/CD ambiguity errors when multiple solution files are present

Benefits

The .slnx format is a new XML-based solution file format introduced in .NET 9 that provides:

  • Cleaner, more readable XML structure
  • Better diff-ability in version control
  • Forward compatibility with future .NET tooling
  • Interoperability with Visual Studio 2022 and later versions
  • Resolves CI/CD workflow errors caused by having multiple solution files

Verification

The .slnx file has been tested and works correctly:

# Restore, build, and test all work with the .slnx file
dotnet restore
dotnet build
dotnet test

# List projects in the solution
dotnet sln EssentialCSharp.ListingManager.slnx list

The .slnx file contains the same two projects and solution items as the original .sln file:

  • ListingManager/EssentialCSharp.ListingManager.csproj
  • ListingManager.Tests/EssentialCSharp.ListingManager.Tests.csproj
  • Solution Items (Directory.Build.props, Directory.Packages.props, NuGet.config, README.md)

Resolves the requirement to migrate to the new solution format.

Original prompt

run dotnet sln migrate (https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln#migrate) to add in a .slnx file to live alongside our .sln file for now (.sln for backwards compatibility for now)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot AI changed the title [WIP] run dotnet sln migrate (https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln#migrate) to add in a .slnx file to live alongside our .sln file for now (.sln for backwards compatibility for now) Add .slnx solution file using dotnet sln migrate Oct 6, 2025
@BenjaminMichaelis
Copy link
Copy Markdown
Member

@copilot maybe we can drop the .sln file and just keep the .slnx?

We get this otherwise.

Run dotnet restore
dotnet restore
shell: /usr/bin/pwsh -command ". '{0}'"
env:
DOTNET_ROOT: /usr/share/dotnet
MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.
Error: Process completed with exit code 1.

Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 6, 2025

@copilot maybe we can drop the .sln file and just keep the .slnx?

We get this otherwise.
...

Done! Removed the .sln file in commit 77884b5. The repository now uses only the .slnx file, which resolves the ambiguity error in CI/CD workflows. Verified that dotnet restore, dotnet build, and dotnet test all work correctly with just the .slnx file.

Copilot AI changed the title Add .slnx solution file using dotnet sln migrate Migrate to .slnx solution file using dotnet sln migrate Oct 6, 2025
@BenjaminMichaelis BenjaminMichaelis marked this pull request as ready for review October 6, 2025 19:22
@BenjaminMichaelis BenjaminMichaelis merged commit 3ac3b09 into main Oct 6, 2025
2 checks passed
@BenjaminMichaelis BenjaminMichaelis deleted the copilot/fix-f94c5a88-73f1-474e-882b-5a11c789a524 branch October 6, 2025 19:24
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