C#C
C#3y ago
Ben

❔ MemoryCache

Added MemoryCache to my dotnet 6 app.
Works fine on windows, ubuntu suddenly throws -
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=7.0.0.0

On library projects (that's referenced from the API) I need to install Microsoft.Extensions.Caching.Memory in order to use MemoryCache.
On the API itself I don't, is that cause of the additional Framework thats installed on the API project?

I've also checked earlier dotnet core versions, where I wasn't required to install this package, could that be a dotnet6 thing?
Was this page helpful?