4

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?

Web Develop Wolf
  • 5,996
  • 12
  • 52
  • 101
  • 1
    This is not currently supported in Visual Studio for Mac. I would open a feature request - https://developercommunity.visualstudio.com/spaces/41/visual-studio-for-mac.html?type=idea – Matt Ward Jan 16 '20 at 15:36

1 Answers1

5

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 + .

Web Develop Wolf
  • 5,996
  • 12
  • 52
  • 101
  • See [this blog post](https://www.karltarvas.com/2019/10/28/visual-studio-mac-manage-user-secrets.html) for some examples on how to conveniently handle all of the above. – Etheryte Jul 08 '20 at 18:43