TemplateStudio icon indicating copy to clipboard operation
TemplateStudio copied to clipboard

Manage user secrets not working

Open suchja opened this issue 3 years ago • 0 comments

Describe the bug

In a WinUI3 project (without Template Studio) it is possible to let VisualStudio create the required UserSecretsId in the csproj and the secrets.user file. This is possible by simply using the "Manage user secrets" menu entry on the context menu of the application project.

Although the VS UI behavior in a Template Studio WinUI3 project is similar, neither the UserSecretsId is generated in the csproj nor the secrets.user file.

To Reproduce

  1. create a new default project with template studio WinUI
  2. open context menu on application project (not core project)
  3. select Manage user secrets
  4. choose yes in the upcoming dialog
  5. Verify that csproj file is not changed and secrets.user file is not automatically opened in VS 2022

Additional context

It is easiest to reproduce the error by using git.

I haven't tried to reproduce this issue with WPF or UWP.

Initializing and adding user secrets via the command line (e.g. dotnet user-secrets init) works without issues.

Applies to the following platforms:

  • [X] WinUI
  • [ ] WPF
  • [ ] UWP

About your setup

  • Visual Studio Version: 17.2.6
  • Template Studio Wizard Version: 5.2.1 (WinUI)
  • Windows Build: 22000.832 (Windows 11 21H2)

suchja avatar Aug 08 '22 15:08 suchja