Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

#10836
Merged
surayya-MS merged 54 commits into
dotnet:maindotnet/msbuild:mainfrom
surayya-MS:slnx-support-followupsurayya-MS/msbuild:slnx-support-followupCopy head branch name to clipboard
Nov 1, 2024
Merged

.slnx support - use the new parser for .sln and .slnx#10836
surayya-MS merged 54 commits into
dotnet:maindotnet/msbuild:mainfrom
surayya-MS:slnx-support-followupsurayya-MS/msbuild:slnx-support-followupCopy head branch name to clipboard

Conversation

@surayya-MS

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

Copy link
Copy Markdown
Member

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.

Comment thread src/Build.OM.UnitTests/Construction/SolutionFile_Tests.cs Outdated

@kasperk81 kasperk81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread eng/BootStrapMsBuild.targets Outdated
Comment thread src/Build/Construction/Solution/SolutionFile.cs Outdated
surayya-MS and others added 2 commits November 1, 2024 15:24
Comment thread src/Build.UnitTests/Construction/SolutionProjectGenerator_Tests.cs
@surayya-MS
surayya-MS merged commit 2e2d372 into dotnet:main Nov 1, 2024
@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
	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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.