Closed Tadimsky closed 6 years ago
@Tadimsky
Do you still have a machine where this never worked?
Can you look for the Microsoft.EntityFrameworkCore.Abstractions package location on disk and post that enumeration? I'd like to figure out how this happened in the first place, why the libraries section doesn't contain the assemblies in the first place. Did you do any specific actions when you ran into this problem?
The reason why you need to delete the assets file is this https://github.com/NuGet/NuGet.Client/pull/1785.
It's a known gap. I've created an issue specifically for that, but note it's an analysis. https://github.com/NuGet/Home/issues/7000
Hey @nkolev92
I do not have it anymore, but I'm thinking I could just restore the assets file and it would break again? How would you like me to find the package location? I was just using Windows Search before. It was showing up in the package cache, the dotnet sdk store folder and the Nuget Fallback location (also under dotnet).
No, all I did was try and build the project on the other machines - 3 machines worked and 3 didn't. On one of the machines I was getting the same error but for Microsoft.CSharp v 4.5
@Tadimsky Personally I use a tool called "everything" for things like this.
All 3 enumerations would been great. Depending on the type of project, different locations are used (non-.NET Core projects won't use the SDK Fallback Folder)
I'd imagine it works now on all machines if you try to restore again, as I'm suspecting it's either an extraction or a setup problem.
Here is some more information we found:
So it looks like it's just not restoring the package correctly? There is no DLL for the library.
NuGet itself doesn't write to the Fallback Folder but merely reads from it.
Basically the root cause here is the assembly for that package is not in the lib folder on the broken machine.
Looks like something could have gone wrong during setup?
// cc @rrelyea @livarcocc
This issue was moved to dotnet/cli#9439
Details about Problem
I recently updated all of our services to target .NET Core 2.1 and everything worked great on my one machine and on someone else's machine. However, most other people were running into an issue like this:
Nothing seemed to fix it - I tried nuking every nuget cache I could find, reinstalling Visual Studio, etc. I then compared the
project.assets.json
file on the machine that worked with the one that didn't and found that the assets file was not updating properly.This is from the machine that didn't work:
You can see that there are no DLLs listed for
Microsoft.EntityFrameworkCore.Abstractions
and onlynet45
DLLs listed forMicrosoft.IdentityModel.Protocols.OpenIdConnect
.This is on the machine where it worked:
If I delete the
project.assets.json
file on the machine then everything works and it recreates it with the format that works. This seems like a pretty gnarly bug (and took down most of our engineers for the day) - any ideas what's happening? Why wouldnuget restore -force
not blow away this file?NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): Nuget.exe
NuGet version (x.x.x.xxx): 4.6.2.5055
dotnet.exe --version (if appropriate): 2.1.300
VS version (if appropriate): 15.8.0 Preview 2
OS version (i.e. win10 v1607 (14393.321)): 17682.1000
Other suggested things
Verbose Logs
I've attached both of the
project.assets.json
files in this zip: NugetRestore.zip