Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 Dot Net 5 how to store user secret for the entire solution

Tags:

.net-core

I have a solution in Visual Studio 2019 that has multiple projects inside, each project represents individual web service. For each project, I have created separate user secret to store database password used in connection string. I would like to have the secret stored in one place if possible, so that I need to change the password only in one place, if it changes. How can I accomplish this ?

Any help is much appreciated

like image 347
Sudhir Jangam Avatar asked Sep 06 '25 02:09

Sudhir Jangam


1 Answers

Edit each .csproj and replace the Guid in UserSecretsId with the same one for each project.

like image 113
nullforce Avatar answered Sep 09 '25 18:09

nullforce