hanssens / localstorage

LocalStorage for .NET - A simple and lightweight tool for persisting data in dotnet (core) apps.
MIT License
74 stars 17 forks source link

unexpected problem - package does not contain any assy references compatible with that framework #25

Closed wvmstr closed 5 years ago

wvmstr commented 5 years ago

PM> Install-Package LocalStorage

Attempting to gather dependency information for package 'LocalStorage.1.1.0' with respect to project 'Website(2)', targeting '.NETFramework,Version=v4.5' Gathering dependency information took 18.7 ms Attempting to resolve dependencies for package 'LocalStorage.1.1.0' with DependencyBehavior 'Lowest' Resolving dependency information took 0 ms Resolving actions to install package 'LocalStorage.1.1.0' Resolved actions to install package 'LocalStorage.1.1.0' Retrieving package 'LocalStorage 1.1.0' from 'nuget.org'. Install failed. Rolling back... Package 'LocalStorage.1.1.0' does not exist in project 'Website(2)' Package 'LocalStorage.1.1.0' does not exist in folder 'C:\Users\Rert\BT\Website\packages' Executing nuget actions took 98.54 ms Install-Package : Could not install package 'LocalStorage 1.1.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. At line:1 char:1

Time Elapsed: 00:00:00.5166156 PM>

hanssens commented 5 years ago

From your sample it looks like you're trying to install LocalStorage v1 (obsolete) in .NET v4.5 (not supported). As of v2.x the LocalStorage lib targets netstandard2.0. This means, only .NET 4.6.1+ and higher is supported.

So if you have the chance to upgrade, I'd suggest to give it another try.