Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing 'Manage User Secrets' context menu item on Visual Studio for Mac

I've been told to manage user secrets on a .net core project, however the context menu item for this seems to be missing in visual studio for Mac? Is it in a different place to windows? Or is there something additional to install etc?

Note: It also didn't add the XML line for the user secret id in the project file either when I opened the project - not sure if that's relevant?

like image 575
Web Develop Wolf Avatar asked Sep 06 '25 03:09

Web Develop Wolf


1 Answers

Turns out (for anyone having the same issue), that on Mac the user secrets have to be created manually in ~/.microsoft/usersecrets/{usersecretid}/secrets.json as the user secret functionality is missing from Visual Studio for Mac.

Worth noting that this is a hidden folder and if it doesn't exist you can create it and that will work. You can show hidden files / folders on mac using CMD + SHIFT + .

like image 159
Web Develop Wolf Avatar answered Sep 08 '25 00:09

Web Develop Wolf