Joelius
Joelius

Reputation: 4349

Installed nuget package is missing files

I'm using a nuget in my project which is supposed to have a namespace called ChartJs.Blazor.ChartJS.Common.Time in the version 0.10.4. For some reason, it tells me the namespace doesn't exist. I'm 100% certain that it does, here's why:

There is absolutely no sign of the absence of these files anywhere.

Since I did some manual testing with the same package version but the package contents were actually different, I suspect caching issues. However, I already tried a few things which helped me previously with a similar issue but none of them worked this time:

FYI, there's nothing of interest at %appdata%/NuGet.

Does anyone know what the issue could be and how it can be resolved? The current workaround is to directly include the dll but that isn't great.

Ps. The installed NuGet version is 5.1.0.6013 but I'm usually just working with Visual Studio 2019 where nuget is integrated.

EDIT:
The library which is consumed via nuget is targetting netstandard2.0 (standard library). The consuming project is targetting netcoreapp3.0 (asp.net core ss-blazor). This alone should not be an issue.

Upvotes: 1

Views: 2076

Answers (1)

Joelius
Joelius

Reputation: 4349

It was indeed a caching issue - it's just sad how much time can go to waste for something this simple. Even though I thought I cleared all cache, I missed a few folders (why does nuget use so many of those?). The solution was to clear all the cache using nuget locals all -clear, which is also described in this answer.

Clear your cache, kids.

Upvotes: 1

Related Questions