I seem to be having an issue with running projects after upgrading to Visual Studio 2022 and installing Net 6.0 SDK. Whenever I open an existing project or even create a new one I get the below errors with the Dependencies.

If I try building the project I get the error:

There aren't any errors in the Error list.
Tried a few things but still nothing helps :
I've tried reinstalling Visual Studio 2022 and Net 6.0
If I try building/debugging a project in Visual Studio Code everything works normally so it doesn't seem to be an issue with the SDK.
Also noticed that I am unable to open the Nuget Package Manager UI but the .csproj file is correct and void of any errors.
Anyone have any ideas on how to resolve this?
I usually install the SDK's manually which seems to have caused the issue.
The solution to fixing this is to uninstall all manually installed SDK packages.
Following the SDK uninstall's, reinstall the net 6.0 and/or prior releases from the Visual Studio installer. I did a fresh install just incase.
All dependencies should load correctly now for net 6.0 projects. If not, please delete the .vs, bin and obj folder for the specific project and open it again in VS2022 and the dependencies should load. Delete the same folders for projects on previous versions.
have you tried dotnet build? that usually forces auto resolving of dependencies!
I've also faced similar issues in recent days after the final release of 2022.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With