AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Manually set assembly info attribute

Open tdykstra opened this issue 1 year ago • 2 comments

Fixes #31862

@roby70 please review.


Internal previews

📄 File 🔗 Preview link
aspnetcore/security/app-secrets.md Safe storage of app secrets in development in ASP.NET Core

tdykstra avatar Feb 23 '24 01:02 tdykstra

@tdykstra I would also suggest using the same user secret id that VS / dotnet CLI generates when you set up the secrets to ensure consistency.

Otherwise, there could be discrepancies in the developer experience. For instance, when working from VS or the CLI, the file secret.json found in the folder %APPDATA%\Microsoft\UserSecrets\<id from the .csproj tag> is used. However, during debug, the program reads the secrets from the file in %APPDATA%\Microsoft\UserSecrets\<id from the UserSecretIdAttribute>. So if the developer work with the Manage user secrets from Visual Studio, the result is that it works on the wrong file.

This behavior can lead to confusion, as seen in the example on Visual Studio generating new user secrets file even though one is given in assembly attribute.

Thanks for your support

roby70 avatar Feb 23 '24 07:02 roby70

Thanks for reporting this and for assisting with the fix for it, @roby70.

tdykstra avatar Feb 24 '24 00:02 tdykstra