C# 可移植类库和系统。键入缺少的方法
我正在尝试将MonkeyArms实现到Xamarin中的一个可移植类库中,用于多平台应用程序。然而,我似乎遇到了一个构建问题 我收到了错误C# 可移植类库和系统。键入缺少的方法,c#,xamarin,portable-class-library,C#,Xamarin,Portable Class Library,我正在尝试将MonkeyArms实现到Xamarin中的一个可移植类库中,用于多平台应用程序。然而,我似乎遇到了一个构建问题 我收到了错误 Type 'System.Type' does not contain a definition for GetInterfaces and no extension method GetInterfaces of type 'System.Type' could be found, are you missing an assembly referen
Type 'System.Type' does not contain a definition for GetInterfaces
and no extension method GetInterfaces of type 'System.Type'
could be found, are you missing an assembly reference.
有没有人在使用其他Nuget软件包时遇到过这个问题?如果有,您的解决方案是什么。或者这只是可移植类库在本质上是最小的问题。要获得最大的可移植性,请尝试使用:
var myInterfaces = myType.GetTypeInfo().GetInterfaces();
当并非所有.NET目标平台都直接支持API时,.NET Portability Analyzer工具通常会为等效代码提供一些很好的提示。