I tried to install Farsi.Library 2.7.0 through the NuGet Package Manager Console.
But following error occurs:
Install-Package : Could not install package 'Farsi.Library 2.7.0'. You
are trying to install this package into a project that targets
'.NETFramework,Version=v4.5.2', 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.
According to his blog entry all versions of this library beyond and including version 2.6 are based on .NET Framework 4.6 - somehow this fixes a few bugs with the persian calendar. This is why the installation fails for you.
Install version 2.5.1.5, the latest version of this library which is based on .NET Framework 2.0, to bypass this.
Or upgrade your project to .NET Framework 4.6 or later.
Install-Package Farsi.Library -Version 2.5.1.5
Related
Error Could not install package 'Square 4.0.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.
i face this issue on version 4.5 , all version of square not installed on this version of website
If you check the page for that package over on nuget.org you'll see that it is built against .NET Standard 1.3. If you then check what .NET version that corresponds to over on Microsofts documentation for .NET Standard you'll also see that .NET Standard corresponds to .NET 4.6. So you can't install this package in a project that targets .NET 4.5.
Also, it is the same requirements for Square 8.1.0 so you should probably get that version instead of 4.0.0.
i am installing nuget package strip.net but when installing it give me this error in visoul studio , i did not find any solution plz need your solution
Severity Code Description Project File Line Suppression State
Error Could not install package 'Stripe.net 39.27.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', 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. 0
The problem is that the latest nuget package Stripe.net 39.27.0 does not support your old target framework version 4.5.2. It is designed by the nuget author.
First, see this of Stripe.net 39.27.0: The nuget package supports net framework >=4.6.1 and net standard>=2.0. Since your target framework is 4.5.2 and also net standard 2.0 does not support 4.5.2 but supports >=4.6.1,see this document, so you do not meet either of these conditions.
So the solution is to either downgrade your nuget package or upgrade the target framework version of your project.
Solution
1) downgrade your nuget package, try to install the nuget package Stripe.net 37.35.0 and it supports net framework 4.5.2.
2) upgrade your project's framework version. Right-click on your project-->Properties-->Application--> change Target Framework to 4.6.1. And then you can install the latest nuget package Stripe.net 39.27.0.
I'm trying to install Dapper 2.0.4 via nuget manager as i want to use the latest Dapper.Contrib features
It didn't proceed due to the following error:
Could not install package 'Dapper 2.0.4'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', 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.
If i install the lower version (1.6), the installation went successful but i can't use the latest Contrib features.
How can i resolve this?
Hoping for your kind help. Thank you.
I tried the following and it worked for me.
Check Target Framework by right-clicking on the project and selecting the Application tab. If the target framework is .NET framework 4.6.1
Install-Package Dapper -Version 2.0.4 works fine.
If the target framework is less than 4.6.1 (In my case another project has target framework 4.5.2) try installing previous versions of Dapper for example:Install-Package Dapper -Version 1.50.2
Try this instead
Go to "Tools > NuGet Package Manager > NuGet Manager Settings > Package Sources
Once in Package Sources, set name to "Package Source" and Source to "https://www.nuget.org/api/v2/package/Dapper/" then update to save
Install .Net Framework SDK version 4.7.1 minimum.
Select installed target as a Target Framework for all Projects in your Solution
(in Project properties).
Retarget all packages in all projects executing update-package -reinstall -
ignoreDependencies from the Package Manager Console.
Install Dapper.
That should do it for you.
Install .Net Framework SDK version 4.7.1 minimum.
Select installed target as a Target Framework for all Projects in your Solution (in Project properties).
Retarget all packages in all projects executing update-package -reinstall -ignoreDependencies from the Package Manager Console.
Install Dapper.
UPDATE (from comments):
Dapper needs .NET Standard 2.0. Please retry the whole procedure including re-targeting with .NET Framework 4.7.2 as this is the first fully compliant with. Source: weblog.west-wind.com/posts/2019/Feb/19/
My packages in my project indicated there was a version update to 2.0 for:
Microsoft.Extensions.Logging
NETStandard.Library
Microsoft.NETCore.Platforms
The only one I cannot get to update is Microsoft.Extensions.Logging
The Error I get is this:
Package 'Microsoft.Extensions.Logging 2.0.0' does not exist in folder '/home/MyUser/UpdatedPon/pon/sbmanager/packages'
Could not install package 'Microsoft.Extensions.Logging 2.0.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.
I have been searching the internet the past few days looking for a solution, but I have not found one as of yet.
Has any one ran into this issue, I am running MonoDevelop 6.1.4
and my MONO version is 5.2.0.215.
Lastly this is a WebForms application.
The Microsoft.Extensions.Logging 2.0.0 NuGet packages has assemblies for .NET Standard 2.0.
A more recent version of NuGet is required for .NET Standard 2.0 to be recognised as a target framework. So you would need to use MonoDevelop 7.1 for this to work. Also your project would need to target .NET 4.6.1 to be able to install the NuGet package.
Alternatively you could try installing the older version Microsoft.Extensions.Logging 1.1.2 which contains .NET Standard 1.1 assemblies which should be recognised by MonoDevelop 6.1.
I'm new to Nugets install and DotLiquid, and I'm getting the following error when installing DotLiquid with Nugets:
Install failed. Rolling back...
Install-Package : Could not install package 'DotLiquid 2.0.64'. 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
+ Install-Package DotLiquid
From here, it says DotLiquid does support .NET Framework 4.5, however I don't know how to "download the nuget package", as the download link from dotliquid only show packages more than 4 years old.
How to fix it?
PS. If I try Get-Package DotLiquid, I'll get this:
PM> Get-Package DotLiquid
No packages installed.
UPDATE:
I've just installed the up-to-date NuGet extension (and restarted my MS VS several times), but the problem remain the same. My current NuGet version:
Package Manager Console Host Version 2.12.0.817