Repository navigation
Support solution filter (.slnf) inputs in dotnet workload restore - #55599
Conversation
|
Azure Pipelines: 3 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
.slnf) inputs in dotnet workload restore
Co-authored-by: marcpopMSFT <[email protected]>
|
@copilot I tested and while dotnet workload restore now recognizes .slnf files, it's not correctly figuring out which projects are referenced and what workloads it needs. In my testing, it installed the latest manifests on restore but then didn't actually detect that the project needed wasm-tools. Can you investigate why? |
Co-authored-by: marcpopMSFT <[email protected]>
Fixed in |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tested and confirmed running restore on an slnf correctly installed the workload I was expecting. I confirmed it still worked restoring csproj and slnx files and tested the negative that restoring a slnf that didn't require any workloads was a noop. This is good to review. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add no-argument coverage and exact-set assertions to address the unresolved regression risks.
Review effort: Lite
Findings: 1
What changed in this PR
Adds .slnf support to dotnet workload restore, including filtered project discovery and parent-solution path resolution.
Changes:
- Recognizes
.slnfinputs. - Resolves filtered projects correctly.
- Adds command and discovery tests.
| File | Summary |
|---|---|
test/dotnet.Tests/CommandTests/Workload/Restore/GivenDotnetWorkloadRestore.cs |
Adds command-level .slnf coverage. |
test/dotnet.Tests/CommandTests/Workload/Restore/DiscoverAllProjectsTests.cs |
Tests filtered solution project discovery. |
src/Cli/dotnet/Commands/Workload/Restore/WorkloadRestoreCommand.cs |
Adds .slnf discovery and path resolution. |
Co-authored-by: Copilot App <[email protected]>

dotnet workload restoredid not accept solution filter inputs, even though solution filters are a standard way to scope project graphs in CI/dev workflows. This change aligns workload restore input handling with restore command behavior for.slnf.Command input handling
dotnet workload restoretarget-path recognition to treat.slnfas a valid solution input.Consistency with restore command
dotnet restoreso command behavior is consistent across restore surfaces..sln/project/directory inputs.Focused test coverage
.slnfinput acceptance and forwarding for workload restore.Example (now supported):