I am trying to use RestSharp
in my C# Visual-Studio 2013 project to POST data at a given URL. When i try to install the package via NuGet it gives me the following error:
Installing 'RestSharp 106.1.0'.
Successfully installed 'RestSharp 106.1.0'.
Adding 'RestSharp 106.1.0' to WebApplicationJson.
Uninstalling 'RestSharp 106.1.0'.
Successfully uninstalled 'RestSharp 106.1.0'.
Install failed. Rolling back...
Could not install package 'RestSharp 106.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.
As far as I have read in GitHub this is mostly an issue for .NetPortable
framework so I am out of ideas. I have also tried to change my framework version to 3.5 but still the same error.
Has anyone encountered a similar issue?
If you need further information please comment.
The latest version, which supports old .NET Framework versions, is 105.2.3.
Install-Package RestSharp -Version 105.2.3
Since the lowest .NET Framework LTE, which supports async
methods is 4.5.2, support of legacy framework has been removed in favour of supporting .NET Standard 2.0 (and .NET Framework 4.5.2).