Add support for creating and editing solution filter (.slnf) files from the CLI#51156
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 <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
530879a to
f2ad541
Compare
template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Solution/Solution1.slnf
Outdated
Show resolved
Hide resolved
|
@copilot a test baseline needs updating:
|
…te.json Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Merge completed in commit 6e92c52. Resolved conflicts in:
All conflicts were resolved by keeping the appropriate code from both branches where changes were complementary, and choosing the release/10.0.2xx version where there were API changes. |
…dd-slnf-file-support-cli
6e92c52 to
db8b579
Compare
|
it again merged from the wrong branch. I fixed locally and used copilot to fix the merge conflicts. I'll rereview and retest just in case. |
|
Fixed the merge issue and retested. It seems to be working as expected. @baronfel one issue I found is that if I have a .sln and create a new solution file, it defaults to assuming a .slnx file exists. I assume that's fine as this is strictly better and customers can use the -s flag if they need to specify a specific solution file. |
|
@copilot there are merge conflicts with origin/release/10.0.3xx. Can you merge that branch in and fix the conflicts? |
Resolved merge conflicts from release/10.0.3xx merge: - Accepted theirs for all non-slnf files (template engine, parsers, tests, etc.) - Kept slnf-specific changes in SolutionAddCommand.cs and CliCommandStrings.resx - Removed files that were deleted in our branch but updated in theirs (BaseAliasAddCommand.cs, CommonOptions.cs, ToolAppliedOption.cs, etc.) - Restored StaticFileHandler.cs from origin as it's needed by DotNetWatcher - Updated XLF files with new slnf resource string
Merge completed in commit that will be pushed shortly. Resolved all 120 conflicts from release/10.0.3xx. Key resolutions:
|
|
@marcpopMSFT - It doesn't look like this has made it into main. Is interbranch merge not setup for 10.0.2xx and 10.0.3xx? |
dotnet new slnfcommand to create solution filter filesdotnet slncommand 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.