There was an error running the seslected coe generator:Package restore failed. Rolling back package changes for <MyProject>.There does not appear to be any indication of what the error was.How can I solve this Error?Error: There was an error running the selected code generator:'package restore failed.Problem. When I tried to run npm install, it gave me this error. error code .
Always got this error when scaffolding suddenly “there was an error running the selected code generator package restore failed”
Why get error when trying to add controller and new scaaffolded item, ASP.NET MVC, VS 2019?.
I try to add controller and a new scaffolded item but I have got the following error: There was an error running the selected code generator:
'Package restore failed. Rolling back package changes for 'MvcMovie'.'
Need to clear the NuGet Cache.
- Go to Tools
- NuGet Package Manager
- Clear All NuGet Cache(s)
Delete ".vs" folder from your solution directory. After reopening solution, execute a "Clean Soluiton" - that worked for me in VS2019, MVC .NET 4.7.2.
I managed to fix the problem by doing an update of all packages to the latest version (3.1.4 for the ones mentioned above).
Needed to update all already installed Nuget packages and then it started working.
bring the version of the solution package to 1.1.3 nuget package Version 1.1.3