I cant update Nuget Package in Visual Studio 2022 (System.NullReferenceException: Object reference not set to an instance of an object at NuGet.PackageManagement.UI.UIActionEngine)

Question: Why is NuGet UI in Visual Studio 2022 not allowing me to upgrade NuGet Packages? It throws an error saying "System.NullReferenceException: Object reference not set to an instance of an object at NuGet.PackageManagement.UI.UIActionEngine.<>c.<ResolveActionsForUpdateAsync>b_9_0(PackageIdentity package)"

Answer: This error means that there is a package inside the YourProjectName.csproj that is preventing other packages from getting upgraded. Take a look and see if you have a line in YourProjectName.csproj that says:

"<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.4" />"

If you do, just comment it out if you are not using SQLite in your project, for some reason SQLite was automatically included in the past Project Templates.

I hope this helps you resolve your problem. If not take a look at another article here.

Edit this Article
System.NullReferenceException Can't Upgrade NuGet Packages in Visual Studio ebook e-book Visual Studio Technology published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

John said:

Another way I solved this issue is by making sure that you don't have any other errors in the referenced project (shared project). This will prevent you from upgrading NuGet Packages in your Project. These errors sometimes are not shown unless you toggle between Intellisense and Build Errors in the "Error List" Window.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy