Question: Nuget Packages not upgrading to Asp.Net 6 packages, I tried several times to upgrade the packages to the latest build but Visual Studio 2022 does not allow that to happen.
Login to See the Rest of the Answer
Answer: Make sure that your Asp.Net 5 Application or Library is targeting Asp.Net 6 first. Go to Project Properties and bump up the Target Version then save changes. After bumping up the version to target AspNet 6, then try to upgrade the Packages to Asp.Net 6 target build using Nuget Packages.
If everything goes well, you should now have all projects in your Project Solution target AspNet 6 and all its dependencies up to date. If the above does not help you, make sure that all the projects the Solution or the main Project has a dependency on are targeting the same framework version which is DotNet6.