I would first try to do an
Update-Package -Id <package_name> –reinstall
as explained in Mikaal's answer.
But in some cases, this could also fail because the packages folder got corrupt. Depending on the platform, it is located in different paths:
In .NET, this folder can be found within the project directory (typically, in the same folder where the solution file *.sln is).
In .NET Core, you can find it by pasting the following line into the file explorer's path (open it via WIN + E, then paste the line above in the path textbox):
%appdata%\..\..\.nuget\packages\
There, try to find the package and delete the folder and its contents. You can also find the path if you go to dependencies in Visual Studio, Packages, right-click on the package and copy the path from the properties window. Note that you might need to close Visual Studio before deleting it, as the files might be locked.
Important: Verify that it isn't referenced any more in Visual Studio (dependencies). If it is, remove any dependencies.
Finally, open the Package manager and add the package (i.e. right-click on the project, select "Manage NUGET Packages...", switch to the Browse tab, select the package and click Install).