You have 2 choice.
- Visual Studio > Tools > Extensions and Updates > search
- Go to https://marketplace.visualstudio.com/items?itemName=guitarrapc.OpenUserSecrets and download > install.
How it works
Visual Studio Extensions to manage UserSecret, generate and open UserSecret json.
The Open User Secret makes it easy to manage UserSecrets and work with your .NET Core project.
Right click ib the Project in Solution Explorer. You will find "Open UserSecret" in the Context menu and UserSecret's secret.json will be open in Visual Studio.
For more information about the extension, visit https://github.com/guitarrapc/OpenUserSecrets
What extension manage
- If PropertyItem "UserSecretsId" entry is missing in .csproj, add entry with random GUID.
- If "secret.json" file is missing, create file.
- Open "secret.json" on the Visual Studio.
Current Status and secret path will output in Visual Studio OutputWindow.
ASP.NET Core project has builtin support for "Manage UserSecrets" when installed "Microsoft.Extensions.Configuration.UserSecrets", however it never appear when installed on .NET Core Console Project.
This Extension will offer access UserSecret to .NET Core Console/Generic project, like ASP.NET Core MVC Project has.
Why Microsoft.Extensions.Configuration.UserSecrets package not found message shown on output window?
- for .NETCore Console Project, install Microsoft.Extensions.Configuration.UserSecrets to the project.
- Use PackageReference NuGet management style.
See https://github.com/guitarrapc/OpenUserSecrets/releases for detail.
- 1.0.3 : fix: extension installation to vs2019 blocked by missing Visual Studio MPF 15.0
- 1.0.2 : feat: add empty json when secrets.json is created via extension
- 1.0.1 : feat: add vs2019 support
- 1.0.0 : Initial release