无法添加人脸认知服务Nuget



我正在尝试将Microsoft Cognitive Service Face API集成到我的Xamarin Forms应用程序中。我已经在我的 PCL 中安装了Microsoft.ProjectOxford.Common.DotNetStandard Version="1.0.0"Microsoft.ProjectOxford.Face" Version="1.4.0"。但是每次我尝试编译代码时,我都会收到一个错误

对于 iOS,我得到:

xxx.iOS/MTOUCH: Error MT2002: Failed to resolve "Microsoft.ProjectOxford.Face.IFaceServiceClient" reference from "Microsoft.ProjectOxford.Face, Version=1.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" (MT2002) 

对于安卓,我得到:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Microsoft.ProjectOxford.Face, Version=1.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Microsoft.ProjectOxford.Face.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference, Mono.Cecil.ReaderParameters parameters) [0x0009a] in /Users/builder/data/lanes/5945/dffc5912/source/monodroid/external/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs:229 
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference) [0x00000] in /Users/builder/data/lanes/5945/dffc5912/source/monodroid/external/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs:179 
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver resolver, System.Collections.Generic.ICollection`1[T] assemblies, Mono.Cecil.AssemblyDefinition assembly, System.Boolean topLevel) [0x0014a] in <96027da06dd5411688a31011072e256f>:0 
at Xamarin.Android.Tasks.ResolveAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAs
semblyResolver resolver) [0x00237] in <96027da06dd5411688a31011072e256f>:0  

Xamarin Forms : 3.0.0.482510. 有人可以帮忙吗?

我认为这是你的问题:

我已经安装了Microsoft.ProjectOxford.Common。DotNetStandardversion="1.0.0", Microsoft.ProjectOxford.Face" version="1.4.0" in my个人电脑

您正在尝试将 .NET 标准库安装到 PCL 中,该库不保证兼容。你希望将 PCL 升级到 .NET 标准库(无论如何,这都是一个好主意(,或者安装较旧版本的 NuGet 包。

相关内容

  • 没有找到相关文章

最新更新