无法将ZXing.Net.Mobile程序包添加到我的Xamarin.Forms项目中 [英] Unable to add ZXing.Net.Mobile package to my Xamarin.Forms project

查看:316
本文介绍了无法将ZXing.Net.Mobile程序包添加到我的Xamarin.Forms项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Xamarin.Forms项目,我想在其中使用ZXing库进行条形码扫描.但是,我无法将软件包ZXing.Net.Mobile和ZXing.Net.Mobile.Forms安装到我的便携式项目中.我不断收到的异常如下:

I have an Xamarin.Forms project in which I want to use ZXing library for barcode scanning. However I am unable to install package ZXing.Net.Mobile and ZXing.Net.Mobile.Forms into my portable project. The exception I keep getting is as follows:

无法安装软件包"ZXing.Net.Mobile 2.0.4.46".您正在尝试将此程序包安装到以'.NETPortable,Version = v4.5,Profile = Profile111'为目标的项目中,但是该程序包不包含任何与该框架兼容的程序集引用或内容文件.有关更多信息,请与软件包作者联系.

关于如何解决此问题的任何想法?

Any ideas on how to solve this?

推荐答案

我快速浏览了软件包的内容,但该软件包并未完全针对PCL Profile 111(.NET Framework 4.5,Windows 8,Windows Phone 8.1)根据文件夹名称.可移植库位于以下文件夹中:

I took a quick look at the package contents, and the package is not completely targeting PCL Profile 111 (.NET Framework 4.5, Windows 8, Windows Phone 8.1) according to the folder name. The portable library is located in the folder:

lib/portable-net45 + netcore45 + wp8 + UAP10.0 + MonoAndroid403 + MonoTouch10 + Xamarin.iOS10

lib/portable-net45+netcore45+wp8+UAP10.0+MonoAndroid403+MonoTouch10+Xamarin.iOS10

缺少与PCL Profile 111兼容的 wpa81 (即Windows Phone 8.1 -Silverlight).

which is missing out wpa81 (i.e. Windows Phone 8.1 non-Silverlight) to be compatible with PCL Profile 111.

由于文件夹名称中包含 netcore45 UAP10.0 ,我怀疑缺少的 wpa81 规范只是包作者的疏忽,可以毫无问题地添加到文件夹名称中.当然,这必须由程序包作者确认,他们将需要更新NuGet程序包.

Since netcore45 and UAP10.0 are included in the folder name, I suspect that the missing wpa81 specification is just an oversight by the package authors and could be added to the folder name without problems. Of course, this has to be confirmed with the package authors, and they would need to update the NuGet package.

作为旁注,我还认为文件夹名称有点过头".为了获得最大的兼容性,我认为最好排除UAP和Xamarin规范.如果使用标准 lib 文件夹命名约定,则NuGet将自动针对这些平台.

As a side note, I also believe the folder name is a little bit "overdone". For maximum compatibility, I think it would be better to exclude the UAP and Xamarin specifications. NuGet targets these platforms automatically if standard lib folder naming conventions are used.

这篇关于无法将ZXing.Net.Mobile程序包添加到我的Xamarin.Forms项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆