Repository navigation
Address file-based app user secrets feedback - #67010
Merged
Merged
Conversation
Scope build-server disabling to file-based app resolution, capture UserSecretsId with MSBuild result output files, add --no-restore for FBA property reads, and cover missing --file and JWT FBA command scenarios. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines file-based app (--file) handling for the dotnet user-secrets and dotnet user-jwts tools by tightening validation and improving how UserSecretsId is resolved from file-based apps, while reducing unintended side effects on normal project-based resolution.
Changes:
- Scoped build-server disabling to file-based app
UserSecretsIdresolution, and switched file-based resolution to use-getResultOutputFileplus--no-restore. - Added
--fileextension validation fordotnet user-secrets(only.cssupported) and added corresponding negative tests. - Expanded
dotnet user-jwtstest coverage for file-based apps (invalid paths/extensions + additional command coverage).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Tools/Shared/SecretsHelpers/ProjectIdResolver.cs | Updates file-based app UserSecretsId resolution to use result output file + scopes build-server disabling behavior. |
| src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs | Adds negative tests for --file (missing file, invalid extension). |
| src/Tools/dotnet-user-secrets/src/Resources.resx | Adds new user-facing error string for invalid --file extension. |
| src/Tools/dotnet-user-secrets/src/CommandLineOptions.cs | Implements .cs-only validation for --file. |
| src/Tools/dotnet-user-jwts/test/UserJwtsTests.cs | Adds additional --file negative tests and file-based coverage for remove/clear/key. |
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
lewing
approved these changes
Jun 4, 2026
Closed
3 tasks
Member
|
/ba-g failure installing node is unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--no-restoreand-getResultOutputFilefor file-based app property readsdotnet user-secrets --fileextensions and add missing negative/FBA command coverageValidation
dotnet test src\Tools\dotnet-user-secrets\test\dotnet-user-secrets.Tests.csproj --no-restore --filter "FullyQualifiedName~SecretManagerTests|FullyQualifiedName~InitCommandTests"dotnet test src\Tools\dotnet-user-jwts\test\dotnet-user-jwts.Tests.csproj --no-restore --filter "FullyQualifiedName~UserJwtsTests" /p:UseIisNativeAssets=false