-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for creating and editing solution filter (.slnf) files from the CLI #51156
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
base: release/10.0.2xx
Are you sure you want to change the base?
Conversation
Initial testing in the codespace (CC @baronfel ), this is reasonably close to what I might want but needs some cleanup:
|
This is customized per-template-engine-host. I'm thinking a long option of @copilot we want to customize the CLI presentation of the
This is common to all templates - the
I'm personally ok with that - in part because the template engine doesn't support
I'm not sure that there's actually a spec here - every slnf in the SDK repo uses
Force and dry-run are cross-cutting commands that are useful - --force allows you to plow over an existing slnf, and --dry-run is just handy for testing and stuff. |
Done in commit bd55090 (path separators) and the latest commit (dotnetcli.host.json). Added For path separator normalization:
|
@copilot add a couple tests covering the usage of the new long and short names of the ParentTemplate parameter in the new template. |
Done. Added 3 tests in the latest commit:
All tests verify that both the long form ( |
…w slnf template Co-authored-by: marcpopMSFT <[email protected]>
Co-authored-by: marcpopMSFT <[email protected]>
Co-authored-by: marcpopMSFT <[email protected]>
Co-authored-by: baronfel <[email protected]>
Co-authored-by: baronfel <[email protected]>
530879a
to
f2ad541
Compare
@@ -0,0 +1,6 @@ | |||
{ |
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.
@copilot there shouldn't be a slnf file added for the solution template at all. remove this and update any tests that changed.
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.
Done. Removed Solution1.slnf
from the Solution template directory and updated template.json
to explicitly exclude it in both format conditions. All template tests now pass (31/31).
@copilot a test baseline needs updating:
|
…te.json Co-authored-by: baronfel <[email protected]>
{ | ||
"condition": "(Format == \"slnx\")", | ||
"exclude": [ "Solution1.sln" ] | ||
"exclude": [ "Solution1.sln", "Solution1.slnf" ] |
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.
@copilot you don't need to exclude it in this file, you just needed to delete it. remove the changes to this file.
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.
Reverted the changes to template.json
. The exclusion rules are back to their original state - only excluding the alternate format file, not the slnf file. All tests still pass (31/31).
Updated all three platform-specific baselines (Linux, OSX, Windows) to include |
Co-authored-by: baronfel <[email protected]>
Co-authored-by: baronfel <[email protected]>
I'm pretty ok with this now, but I am disappointed that there so much whole-project formatting change in this PR. |
@copilot two more test failures:
|
Co-authored-by: baronfel <[email protected]>
Updated both test baselines to include the slnf template entry. Both tests now pass. |
dotnet new slnf
command to create solution filter filesdotnet sln
command to support slnf filesOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.