0

When I try to scaffold the files for Identity in ASP.Net I get an error message.

I have seen the answers to previous questions like this. And all my packages are up to date. I don't know what I'm doing wrong.

I have tried putting all other packages to 5.0.2, that did nothing.

This is the error message I get.

ErrorMessage

My Installed packages.

InstalledPackages

The update tab.

UpdateTab

Basje313
  • 29
  • 5
  • Did you check this link? https://stackoverflow.com/questions/45906856/package-restore-failed-rolling-back-package-changes – Kamran Mammadov Apr 29 '21 at 12:42
  • I have tried the tips, I cleared the cache, and as I said already tried to roll back the solution to 5.0.2. That didn't help. – Basje313 Apr 29 '21 at 12:48
  • Which version of Visual Studio 2019 are you using? Try to use [Visual Studio 2019 16.8 or later](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019) Besides, I suggest you create a new Asp.Net core project, will Scaffold work? If it works in the new project, I suggest you check the worked project csproj file, then, according to it you change your main application's csproj file. Or, you can copy the code to the new project. – Zhi Lv Apr 30 '21 at 07:53
  • I'm using 16.9.4. I tried running a scaffolding in another test project, there it worked, and in the .csproj file all packages seemed 5.0.4. I the set all the packages in my original project to 5.0.4 and it worked! Thanks a lot, not only for the answer, but also for an easy way to test things in the future. – Basje313 Apr 30 '21 at 08:54
  • Does this answer your question? [Error : Package restore failed](https://stackoverflow.com/questions/44509694/error-package-restore-failed) – Sayyed Dawood May 01 '21 at 01:50

1 Answers1

0

As mentioned in the comments above, I made a test solution and scaffolded immediately. This worked, and I saw that the packages had version 5.0.4.

I transferred the packages in my main project to 5.0.4, and the scaffolding was successful!

Basje313
  • 29
  • 5