TemplateStudio
TemplateStudio copied to clipboard
Manage user secrets not working
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
- create a new default project with template studio WinUI
- open context menu on application project (not core project)
- select Manage user secrets
- choose yes in the upcoming dialog
- 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)