1

While trying to create a new view in asp.net core project i got an error: There was an error running the selected code generator: Package restore failed. Rolling back package changes for 'ProjectName'. Soultion runs successfully that error only happens while trying to add a new view.

I've already tried to delete .vs folder and rebuild solution/project Reload PC Clear all nuget packages cache

Kode
  • 29
  • 2
  • Possible duplicate of [Package restore failed. Rolling back package changes](https://stackoverflow.com/questions/45906856/package-restore-failed-rolling-back-package-changes) – Paulo Campez May 29 '19 at 19:38

1 Answers1

0

I had the same problem, here is what i did:

  1. Checked if both projects target the same framework.
  2. Make sure not to have duplicate packages installed and if you need to have make sure that you they are the same version
  3. If you have EntityFrameworkCore.SqlServer v.3.1.22 installed, downgraded it to v.3.1.21.
  4. Rebuild the solution

After I downgraded this package it started working.

burgija09
  • 31
  • 2