How come an upgraded ASP.net Core 6.0 to 8.0 App isnt automatically able to use the User Secrets Configuration Provider?

  Kiến thức lập trình

I have upgraded my ASP.NET Core app from version 6.0 to 8.0. I have upgraded all the nuget packages.

I have a Secrets.json file in Connected Services in VS 2022. I have the “ConnectionStrings.AppConfig” value in it.

When I start the application it doesn’t use the user secrets.

However, when I add “builder.Configuration.AddUserSecrets();” to my Program.cs it works. I shouldn’t have to do this.

When I create a brand new ASP.NET Core app everything works fine without me having to put in that line.

What do I need to do to make it work without adding that line of code?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT