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.

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.

👍

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
rainersigwald added a commit to rainersigwald/msbuild that referenced this pull request Feb 24, 2025
…#10836)"

This reverts commit 2e2d372.

This will avoid problems arising from using the new library in NuGet.exe
scenarios and bugs in the library.

Conflicts:
	documentation/wiki/ChangeWaves.md
rainersigwald added a commit to rainersigwald/msbuild that referenced this pull request Feb 24, 2025
…#10836)"

This reverts commit 2e2d372.

This will avoid problems arising from using the new library in NuGet.exe
scenarios and bugs in the library.

Conflicts:
	documentation/wiki/ChangeWaves.md
	src/Framework/ChangeWaves.cs
rainersigwald added a commit that referenced this pull request Feb 25, 2025
…" (#11488)

This reverts commit 2e2d372.

This will avoid problems arising from using the new library in NuGet.exe
scenarios and bugs in the library.

Conflicts:
	documentation/wiki/ChangeWaves.md
	eng/Version.props
	src/Framework/ChangeWaves.cs
surayya-MS added a commit to surayya-MS/msbuild that referenced this pull request Mar 4, 2025
surayya-MS added a commit that referenced this pull request Mar 7, 2025
…11538)

* revert "Revert ".slnx support - use the new parser for .sln and .slnx (#10836)""

* opt-in sln parsing with SolutionPersistence

* add SlnParsingWithSolutionPersistenceOptIn to Traits

* bring back comment about revertin .sln parsing with SolutionPersistence in ChangeWaves

* fix tests

* remove empty line

* opt-in and -out of sln parsing with the new parser in SolutionFileTests

* fix tests without using common testenv

* fix tests

* fix

* rename env var to MSBUILD_PARSE_SLN_WITH_SOLUTIONPERSISTENCE

* fix closing bracket

* change ParseSolutionHelper to call SolutionFile.Parse
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