Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msbuild 17.13 fails to build "version 13" solutions #11450

Closed
znakeeye opened this issue Feb 16, 2025 · 2 comments
Closed

msbuild 17.13 fails to build "version 13" solutions #11450

znakeeye opened this issue Feb 16, 2025 · 2 comments
Assignees
Labels
Priority:2 Work that is important, but not critical for the release triaged

Comments

@znakeeye
Copy link

Just upgraded to VS 17.13. Now msbuild fails to build my solutions. E.g. msbuild test.sln gives me this error:

C:\git\test.sln : error MSB4025: The project file could not be loade
d. System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.SolutionPersistence.Model.Soluti
onException: The file version '13' is unsupported.

Steps to reproduce

  1. Create an empty C++ project/solution.
  2. Change the version of the .sln file to 13.00. Not sure where I got this number from, but it's been in our repo for many years.
Microsoft Visual Studio Solution File, Format Version 13.00

If you search Github for that string, you'll find some 1200 references. What's up with this?

@CyrusNajmabadi
Copy link
Member

This is not the MSBuild repo.

@CyrusNajmabadi CyrusNajmabadi transferred this issue from dotnet/roslyn Feb 16, 2025
@maridematte maridematte added Priority:2 Work that is important, but not critical for the release triaged and removed untriaged labels Feb 18, 2025
@surayya-MS
Copy link
Member

surayya-MS commented Feb 18, 2025

This is not a bug. The latest supported version is 12.00. Format Version 13.00 doesn't exist. Please change it to 12.00.

Previously this worked because MSBuild solution parser didn't check the format version. Now, we use Microsoft.VisualStudio.SolutionPersistence to parse solution. The change was introduced in #10836

Here is the test ensuring this https://github.com/microsoft/vs-solutionpersistence/blob/0b6f82a4073ce0ff0419991ea0cd6dd6898a51ac/test/Microsoft.VisualStudio.SolutionPersistence.Tests/Serialization/InvalidSolutions.cs#L190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Work that is important, but not critical for the release triaged
Projects
None yet
Development

No branches or pull requests

4 participants