Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin.forms 无法添加人脸识别服务Nuget_Xamarin.forms_Microsoft Cognitive - Fatal编程技术网

Xamarin.forms 无法添加人脸识别服务Nuget

Xamarin.forms 无法添加人脸识别服务Nuget,xamarin.forms,microsoft-cognitive,Xamarin.forms,Microsoft Cognitive,我正在尝试将Microsoft认知服务Face API集成到我的Xamarin表单应用程序中。我已在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 "Microsof

我正在尝试将
Microsoft认知服务Face API
集成到我的
Xamarin表单
应用程序中。我已在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) 
对于Android,我得到:

    /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  
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2):错误:加载程序集时出现异常:System.IO.FileNotFoundException:无法加载程序集“Microsoft.ProjectOxford.Face,版本=1.4.0.0,区域性=中性,PublicKeyToken=31bf3856ad364e35”。可能它在Mono for Android配置文件中不存在?
文件名:“Microsoft.ProjectOxford.Face.dll”
位于Java.Interop.Tools.Cecil.directorySassemblyResolver.Resolve(Mono.Cecil.AssemblyNameReference,Mono.Cecil.ReaderParameters参数)[0x0009a]在/Users/builder/data/lanes/5945/dffc5912/source/monodroid/external/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/directorySassemblyResolver.cs:229中
在/Users/builder/data/lanes/5945/dffc5912/source/monodroid/external/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/directorySassemblyResolver.cs:179中的Java.Interop.Tools.directorySassemblyResolver.resolver(Mono.Cecil.AssemblyNameReference)[.0x00000]
在Xamarin.Android.Tasks.ResolveAssemblys.AddAssemblyReferences(Java.Interop.Tools.Cecil.directorySolver解析器,System.Collections.Generic.ICollection`1[T]Assemblys,Mono.Cecil.AssemblyDefinition assembly,System.Boolean topLevel)[0x0014a]中:0
在Xamarin.Android.Tasks.resolvestassemblies.Execute(Java.Interop.Tools.Cecil.DirectoryAs
semblyResolver解析器[0x00237]位于:0
沙马林形态:3.0.0.482510。
有人能帮忙吗?

我想这就是你的问题所在:

我已经安装了Microsoft.ProjectOxford.Common。DotNetStandard Version=“1.0.0”,Microsoft.ProjectOxford.Face“Version=“1.4.0”在我的 PCL

您正在尝试将一个.NET标准库安装到您的PCL中,该库不保证兼容。您要么想将PCL升级到.NET标准库(无论怎样,这都是一个好主意),要么安装旧版本的NuGet软件包