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

sln-remove: Support for slnx #45160

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

edvilme
Copy link
Member

@edvilme edvilme commented Nov 26, 2024

Contributes to #40913

The dotnet CLI should support the new slnx format for building and in the existing solution management commands. It should also help interested users migrate to the new format.

This adds dotnet sln remove support for .slnx files

Breaking changes

  • Command will fail when passed a solution file with duplicate sources: vs-solutionpersistence does not allow duplicate references (ie, listing the same project twice) in a solution file.

@edvilme edvilme force-pushed the edvilme-slnx-remove branch from 6120f36 to 765016a Compare December 12, 2024 16:28
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.

hoist childrenByParent computation out of recursive step

src/Cli/dotnet/commands/dotnet-sln/remove/Program.cs Outdated Show resolved Hide resolved
src/Cli/dotnet/commands/dotnet-sln/remove/Program.cs Outdated Show resolved Hide resolved
@kasperk81
Copy link
Contributor

@edvilme lets address the feedback and get this in 9.0.200 to close the lid on this feature. without this, IDEs like vscode which rely on sdk aren't going to use this feature

@baronfel
Copy link
Member

@kasperk81 he's out for vacation - this command will still make 9.0.200 (code freeze is mid-January) but likely won't make a particular VS preview insertion as a result.

@edvilme
Copy link
Member Author

edvilme commented Dec 24, 2024

@edvilme lets address the feedback and get this in 9.0.200 to close the lid on this feature. without this, IDEs like vscode which rely on sdk aren't going to use this feature

Hello, I am out for vacation but will regularly check for updates. Thanks for the suggestions, the idea of storing SolutionItemModels in a dictionary is really good. I added it to the commit history with some modifications :)

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.

ci merges main branch to pr branch before the execution. instead of ignoring null throw exceptions from test for unexpected case which will fail it to make compiler happy and code free of null discard !

i tested the fix locally after merging main in your branch

test/dotnet-sln.Tests/GivenDotnetSlnRemove.cs Outdated Show resolved Hide resolved
test/dotnet-sln.Tests/GivenDotnetSlnRemove.cs Outdated Show resolved Hide resolved
test/dotnet-sln.Tests/GivenDotnetSlnRemove.cs Outdated Show resolved Hide resolved
test/dotnet-sln.Tests/GivenDotnetSlnRemove.cs Outdated Show resolved Hide resolved
test/dotnet-sln.Tests/GivenDotnetSlnRemove.cs Outdated Show resolved Hide resolved
test/dotnet-sln.Tests/GivenDotnetSlnRemove.cs Outdated Show resolved Hide resolved
test/dotnet-sln.Tests/GivenDotnetSlnRemove.cs Outdated Show resolved Hide resolved
Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants