Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode - How to manage User Secrets in .Net Core 2.0+ API

I'm very familiar with how to create and manage user secrets in Visual Studio by right clicking the project in the solution explorer. And managing the

Is there a way to do this in VS Code?
Does it matter if it's on a Mac? Is there an extension that will provide a similar experience?

like image 415
A.Rowan Avatar asked Feb 26 '19 01:02

A.Rowan


People also ask

How do I manage secrets in VS code?

In Visual Studio, right-click the project in Solution Explorer, and select Manage User Secrets from the context menu. This gesture adds a UserSecretsId element, populated with a GUID, to the project file.

How do I access user secrets in NET Core?

By far the easiest way to use User Secrets is via Visual Studio. Right click your entry project and select “Manage User Secrets”. Visual Studio will then work out the rest, installing any packages you require and setting up the secrets file! Easy!

Where are .NET user secrets stored?

Your secrets are stored in a JSON file under your user profile. In a Windows machine, they are stored in the %APPDATA%\Microsoft\UserSecrets\<user_secrets_id>\secrets. json file.


1 Answers

Download extension i.e .NET Core User Secrets.Then right click on .csproj file of your project to get Manage user secrets file.

like image 123
Avinash T H Avatar answered Oct 12 '22 06:10

Avinash T H