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
It appears that they haven't added that (at least to Visual Studio 2015) as an option for Console or DLL apps.
You can use this as a work around, but do so at your own risk, it will trick Visual Studio into believing that the dll project has Web capabilities as well.
Assuming Windows OS
Open File Explorer to C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v{Version Number}\DotNet
note: 14.0 is VS 2015, 15.0 is 2017 etc
backup the file named Microsoft.DotNet.targets
Add this line to Microsoft.DotNet.targets
next to the other ProjectCabability
tag
<ProjectCapability Include="DotNetCoreWeb" />
Save the file, and unload and reload your project / restart visual studio.
You may also need to delete your .suo file and/or your .vs folder
You should now see the context menu. It also changes the icon unfortunately. It seems to build just fine, but this is pretty untested so seriously, use at your own risk.
Additionally to the answers posted here, if you want a link to your own secrets.json file in your project, you can add the following code to an ItemGroup in your project file:
<None Include="$(AppData)\microsoft\UserSecrets\$(UserSecretsId)\secrets.json" Link="secrets.json" />
Manage User Secrets
is available from the context menu of .NET Core Console projects (not just ASP.NET Core projects) since Visual Studio 2019 (verified in version 16.1.3), once you reference the Microsoft.Extensions.Configuration.UserSecrets
NuGet.