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

.slnx support - use the new parser for .sln and .slnx #10836

Merged
merged 54 commits into from
Nov 1, 2024

Conversation

surayya-MS
Copy link
Member

@surayya-MS surayya-MS commented Oct 17, 2024

Context

The .slnx support PR is split in 2 - 1. use new parser for .slnx, 2. use new parser for both .sln (under change wave) and .slnx. This is the follow-up PR.

Changes Made

  • Use Microsoft.VisualStudio.SolutionPersistence parser to parse .slnx and .sln (applied 17.13 change wave for .sln)
  • Throw ArgumentException if solutionFile is null or empty (applied 17.13 change wave)

Testing

  • Moved tests from SolutionFile_Tests that are old parser specific to the SolutionFile_OldParser_Tests.

  • Some of them already had duplicates there:
    BadVersionStamp, VersionTooLow, ParseSolutionFileWithDescriptionInformation, MissingNestedProject, ParseInvalidSolutionConfigurations1, ParseInvalidSolutionConfigurations2, ParseInvalidSolutionConfigurations3.

  • Deleted SolutionFile_Tests.SharedProjects test because it just checks dependencies and we already have test for that. It also has "GlobalSection(SharedMSBuildProjectFiles)" section but we do not parse it in the old parser.

  • Changed SolutionProjectGeneratorTests - refactored strings and used both old and new parsers in the tests (except where only the old one can be used, made a remark there about it)

  • Deleted GraphConstructionShouldThrowOnMissingSolutionDependencies test because it checks specifics of how solution projects' dependencies were parsed. "SolutionParseProjectDepNotFoundError" is thrown when the project dependency does not exist. And this is handled differently in the new parser - the dependency is not added at all if it did not exist in solution.

rainersigwald added a commit to rainersigwald/msbuild that referenced this pull request Oct 25, 2024
This should help identify failures like dotnet#10836 (comment).
eng/Versions.props Outdated Show resolved Hide resolved
eng/Versions.props Outdated Show resolved Hide resolved
Copy link
Contributor

@kasperk81 kasperk81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

eng/BootStrapMsBuild.targets Outdated Show resolved Hide resolved
src/Build/Construction/Solution/SolutionFile.cs Outdated Show resolved Hide resolved
surayya-MS and others added 2 commits November 1, 2024 15:24
@surayya-MS surayya-MS merged commit 2e2d372 into dotnet:main Nov 1, 2024
10 checks passed
@surayya-MS surayya-MS deleted the slnx-support-followup branch November 1, 2024 15:37
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.

5 participants