I've recently tried to update one of my APIs and stumbled uppon the error: "Package restore failed. Rolling back package changes for API" while trying to scaffold a controller.
The API builds and rebuilds okay, all new scaffolding gets always rejected.
My current target framework is .Net core 3.1. My current package versions are 3.1.9 and 3.1.4. These packages always worked, even like a month or two ago when I was first building the API.
What i've tried:
- Installing and uninstalling NuGet packages
- Changing the versions of the packages
- I cleared all the NuGet cache and rebuilt the API
- I cleared all the NuGet cache and tried scaffolding without building
- Restarted visual studio
- Changed the target framework
What I've noticed is that when I try to scaffold, the version of microsoft.entityframeworkcore.sqlserver that copies locally is 3.1.10, but my NuGet manager version is 3.1.9.
When I only build the API the correct version gets copied, but as soon as I scaffold, the 3.1.10 copies again.
Nowhere in the NuGet manager have I selected the 3.1.0 version, neither is it specified in the dependecies. I assume the issue is somewhere here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…