Skip to content

Address file-based app user secrets feedback - #67010

Merged
lewing merged 3 commits into
mainfrom
damianedwards/user-secrets-fba-followup
Jun 4, 2026
Merged

lewing merged 3 commits into
mainfrom
damianedwards/user-secrets-fba-followup

Conversation

@DamianEdwards

Copy link
Copy Markdown
Member

Summary

  • Scope build-server disabling to file-based app UserSecretsId resolution only
  • Add --no-restore and -getResultOutputFile for file-based app property reads
  • Validate dotnet user-secrets --file extensions and add missing negative/FBA command coverage

Validation

  • 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

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]>
Copilot AI review requested due to automatic review settings June 4, 2026 00:15
@github-actions github-actions Bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Jun 4, 2026
@DamianEdwards
DamianEdwards requested a review from lewing June 4, 2026 00:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 UserSecretsId resolution, and switched file-based resolution to use -getResultOutputFile plus --no-restore.
  • Added --file extension validation for dotnet user-secrets (only .cs supported) and added corresponding negative tests.
  • Expanded dotnet user-jwts test 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

lewing commented Jun 4, 2026

Copy link
Copy Markdown
Member

/ba-g failure installing node is unrelated

@lewing
lewing merged commit 6865ecc into main Jun 4, 2026
21 of 25 checks passed
@lewing
lewing deleted the damianedwards/user-secrets-fba-followup branch June 4, 2026 19:33
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview6 milestone Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants