Mac OS 下安装vs2017 在xamarin.forms的工程里无法安装任何其他的package

heihei1981 2017-06-30 02:27:29

安装环境与情况描述:
在Mac Pro 上安装了 mac环境下的VS2017, 安装时,安卓的SDK没装,其他都已安装
新建一个xamarin.forms空白APP工程,在解决方案下的packages目录下只有xamarin.forms,由于工程中想用到.net中的system.thread.timer 类的某些功能,所以需要安装相应的package,添加时找到package,点击install 提示是否接受,点击确定后,报如下错误




Attempting to gather dependency information for package 'System.Threading.Timer.4.0.1' with respect to project 'Work1', targeting '.NETPortable,Version=v4.5,Profile=Profile111'
GET https://api.nuget.org/v3/registration2-gz/system.threading.timer/index.json
OK https://api.nuget.org/v3/registration2-gz/system.threading.timer/index.json 383ms
Total number of results gathered : 2
Gathering dependency information took 599.11 ms
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json - 598.11 ms
Attempting to resolve dependencies for package 'System.Threading.Timer.4.0.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'System.Threading.Timer.4.0.1'
Resolved actions to install package 'System.Threading.Timer.4.0.1'
Retrieving package 'System.Threading.Timer 4.0.1' from 'nuget.org'.
For adding package 'System.Threading.Timer.4.0.1' to project 'Work1' that targets 'portable45-net45+win8+wpa81'.
Install failed. Rolling back...
Package 'System.Threading.Timer.4.0.1' does not exist in project 'Work1'
Package 'System.Threading.Timer.4.0.1' does not exist in folder '/Users/chenwei/Projects/Work1/packages'
Executing nuget actions took 213.48 ms
Could not install package 'System.Threading.Timer 4.0.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', 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.


是什么原因造成的? 另外后面发现安装任意一个package都不能成功,具体错误结果和上述错误描述一致

...全文
1297 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

436

社区成员

发帖
与我相关
我的任务
社区描述
欢迎来到Xamarin技术交流论坛学习交流,Xamarin是一个行动App开发平台,开发人员透过Xamarin可开发出iOS、Android 与Windows 等平台的...
社区管理员
  • Xamarin技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧