Manually set assembly info attribute
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 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
Thanks for reporting this and for assisting with the fix for it, @roby70.