This article discusses what to do when your package restore fails.
1. In Visual Studio 2019, goto Tools > Options > Nuget Package Manager >Package Manager Setting > General > Clear All Nuget Cache(s).
2. You may need to change your target framework in your project to what was it before
You can do this by opening the .csproject file in a text editor
For more information, refer to this post: https://stackoverflow.com/questions/45906856/package-restore-failed-rolling-back-package-changes