-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix dotnet format failure to handle slnx files #47508
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where dotnet-format failed to handle .slnx files by updating the condition that determines if a file is a solution file.
- Updated the solution file extension check in MSBuildWorkspaceFinder.cs
- Added support for .slnx file extensions
Comments suppressed due to low confidence (1)
src/BuiltInTools/dotnet-format/Workspaces/MSBuildWorkspaceFinder.cs:60
- Consider adding test cases to verify that the new .slnx extension is correctly identified as a solution file.
|| workspaceExtension.Equals(".slnx", StringComparison.OrdinalIgnoreCase);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Looks good to me, we weren't sure if it was already supported by your command :)
We'll need the tactics template and stuff to get approval here. |
@baronfel the other two places missing slnx handling #40913 (comment) |
Hello @sharwell sice you have a bit more context, could you please help us out with the template and email? Thx! |
Added "DO NOT MERGE" to avoid accidental merges after rerunning tests :) |
@sharwell, did you intend to add servicing-consider? |
Would really like to have this plz |
can someone else fill the template if op isn't available for three weeks? pr description has the clear context: not a regression, rather it's for |
I can probably just add servicing-consider; it doesn't look like a risky PR to me. My only concern is that since I'm not fully aware of the impact of the change, I'm not sure I could make a good case for it if there's any pushback. |
I was told to not do this so unmarking it. @sharwell? |
Hello there. I really hope this will be merged very soon. It's really extremely annoying for those who use Thanks! |
any release plan for this fix? |
This will be discussed tomorrow in tactics for inclusion in May servicing. |
dotnet/sdk#40913 and dotnet/sdk#47508 have been merged, and the .sln file is no longer required for CI/CD. Hello SDK-style solutions!
This is a follow-up to #45442.
Currently
dotnet format
throws an exception instead of completing when a user explicitly specifies a .slnx-format solution file to format. The previous work in #45442 to add support for this format only covered the case where a directory was specified. Customers who prefer to be explicit, and/or customers that have more than one solution file in the same folder, will not be able to use dotnet format to format a .slnx solution without this fix.This is not a regression, but rather completes the implementation behavior intended to be included in this release with the earlier pull request.
The risk involved in this change is very low.
Fixes #47038