How to get “Manage User Secrets” in a .NET Core console-application?

前端 未结 9 1444
醉梦人生
醉梦人生 2020-12-28 12:07

When I create a new ASP .NET Core Web-Application, I can right-click the project in Visual Studio, and I see a context-menu entry called \"Manage User Secre

9条回答
  •  梦毁少年i
    2020-12-28 12:38

    1. Right click on the project and click edit csproj file.
    2. On first line replace with and save.

    Now you can access to manage user secrets menu, edit it and save. Then you have to restore the first line of the csproj file to its defaults to be again a console app.

    It's stupid but it works. Remember replace the usersecretsid property for every project or will just have one secrets.json for all your projects.

提交回复
热议问题