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)"


Login to See the Rest of the Answer

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.





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.

Posted On: September 01, 2021 15:18:19 PM


For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email Address[email protected]