我正在尝试在我的C# Visual-Studio 2013项目中使用RestSharp
来将数据POST到给定的URL。当我尝试通过NuGet安装包时,它会给我以下错误:
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.
根据我在 GitHub 的阅读,这主要是针对.NetPortable
框架的问题,所以我想不出任何办法。我还尝试将框架版本更改为3.5,但仍然出现相同的错误。有人遇到过类似的问题吗? 如果需要更多信息,请留言评论。