xamarin.ios – xamarin组件无法解析程序集

xamarin.ios – xamarin组件无法解析程序集,第1张

概述我正在尝试构建一个xamarin组件. 我从Binding项目创建了一个SomeLibrary.dll. 使用此SomeLibrary.dll和组件模板( https://components.xamarin.com/guidelines ),我已经生成了一个SomeLibrary-1.0.xam组件. 我执行此命令将SomeLibrary组件安装到Xamarin Studio上(因此我可以在将组 我正在尝试构建一个xamarin组件.
我从Binding项目创建了一个Somelibrary.dll.
使用此Somelibrary.dll和组件模板( https://components.xamarin.com/guidelines
),我已经生成了一个Somelibrary-1.0.xam组件.

我执行此命令将Somelibrary组件安装到Xamarin Studio上(因此我可以在将组件提交到商店之前对其进行测试):

mono xamarin-component.exe安装/Users/somedeveloper/Desktop/XamarinComponent/component-template-master/Somelibrary-1.0.xam

(http://forums.xamarin.com/discussion/5640/test-component-packaging推荐)

现在,我正在尝试测试我的Somelibrary组件.我创建了一个全新的项目,将组件添加到我的项目中,写了几行使用Somelibrary API,并在构建和运行时遇到以下错误.
我在这里迷茫和困惑,任何想法,建议都会很棒.^^.

我从错误中看到的主要是:

错误MT2002:无法解析程序集:’Somelibrary,Version = 0.0.0.0,Culture = neutral,PublicKeyToken = null’

它似乎在抱怨某种PublicKeyToken.这是什么?我是否必须为Somelibrary组件生成PublicKeyToken?如果是这样,我如何生成PublicKeyToken.

感谢并感谢任何帮助,建议或评论!^ _ ^!,

完整错误日志

Building: SomelibraryComponent (DeBUG|iPhone)Detecting signing IDentity...Provisioning Profile: XXXXXXXXXXXXXXXXXXXXXXXXXXXXSigning IDentity: "iPhone Developer: XXXXXXXXXX (ALKJLKJsLDKJFLJ)"App ID: "SDLFJLKSDJF.somelibrarycomponent"Performing main compilation.../library/Frameworks/Mono.framework/Versions/3.2.3/bin/mcs /noconfig "/r:/Developer/Monotouch/usr/lib/mono/2.1/mscorlib.dll" -nostdlib     "/out:/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/bin/iPhone/DeBUG/SomelibraryComponent.exe" "/r:/Developer/Monotouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/Monotouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/Monotouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/Monotouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Users/somedeveloper/projects/SomelibraryComponent/Components/Somelibrary-1.0/lib/ios/Somelibrary.iOS.dll" "/r:/Developer/Monotouch/usr/lib/mono/2.1/System.Core.dll" /nologo /warn:4 /deBUG:full /optimize- /codepage:utf8 "/define:DEBUG;__MOBILE__;__IOS__"  /t:exe "/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/Main.cs" "/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/AppDelegate.cs" "/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/SomelibraryComponentVIEwController.cs" "/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/SomelibraryComponentVIEwController.designer.cs"Compilation succeeded - 1 warning(s)/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/SomelibraryComponentVIEwController.cs(48,24): warning CS0672: Member `SomelibraryComponent.somelibraryComponentVIEwController.ShouldautorotatetoInterfaceOrIEntation(Monotouch.UIKit.UIInterfaceOrIEntation)' overrIDes obsolete member `Monotouch.UIKit.UIVIEwController.ShouldautorotatetoInterfaceOrIEntation(Monotouch.UIKit.UIInterfaceOrIEntation)'. Add the Obsolete attribute to `SomelibraryComponent.somelibraryComponentVIEwController.ShouldautorotatetoInterfaceOrIEntation(Monotouch.UIKit.UIInterfaceOrIEntation)'/Developer/Monotouch/usr/lib/mono/2.1/monotouch.dll (Location of the symbol related to prevIoUs warning)Build complete -- 0 errors,1 warningCompiling to native code/Developer/Monotouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --cache "/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/obj/iPhone/DeBUG/mtouch-cache" --nomanifest --nosign -dev "/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/bin/iPhone/DeBUG/SomelibraryComponent.app" -r "/Developer/Monotouch/usr/lib/mono/2.1/System.dll" -r "/Developer/Monotouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/Monotouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/Monotouch/usr/lib/mono/2.1/monotouch.dll" -r "/Users/somedeveloper/projects/SomelibraryComponent/Components/Somelibrary-1.0/lib/ios/Somelibrary.iOS.dll" -deBUG -sdk "6.1" -targetver "6.0" --abi=armv7 "-v" "-v" "-v" "--compiler:clang++" "/Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/bin/iPhone/DeBUG/SomelibraryComponent.exe"Xamarin.iOS 7.0.1.4 (4cfca2f) Business Edition using framework:     /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdklinking assembly     /Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/bin/iPhone/DeBUG/SomelibraryComponent.exe into     /Users/somedeveloper/projects/SomelibraryComponent/SomelibraryComponent/obj/iPhone/DeBUG/mtouch-cache/PreBuilderror MT2002: Failed to resolve assembly: 'Somelibrary,Version=0.0.0.0,Culture=neutral,PublicKeyToken=null'Failed to resolve assembly: 'Somelibrary,PublicKeyToken=null'  at Monotouch.Tuner.linker.Process (Monotouch.Tuner.linkerOptions options,Mono.linker.linkContext& context,System.Collections.Generic.List`1& assemblIEs) [0x00000] in <filename unkNown>:0  at Mtouch.linkAssemblIEs (System.String main,System.Collections.Generic.List`1& assemblIEs,System.String output_dir,Mono.linker.linkContext& link_context) [0x00000] in <filename unkNown>:0  at Monotouch.Application.Managedlink () [0x00000] in <filename unkNown>:0  at Monotouch.Application.ProcessAssemblIEs () [0x00000] in <filename unkNown>:0  at Monotouch.Application.BuildApp () [0x00000] in <filename unkNown>:0  at Monotouch.Application.Build () [0x00000] in <filename unkNown>:0  at Mtouch.Main2 (System.String[] args) [0x00000] in <filename unkNown>:0  at Mtouch.Main (System.String[] args) [0x00000] in <filename unkNown>:0
解决方法 它与公钥(令牌)无关.

从日志的第一部分开始,您的.dll似乎被命名为“Somelibrary.iOS.dll”.但是,错误消息是查找“Somelibrary”,而不是“Somelibrary.iOS”.

文件名和内部程序集名称之间必定不匹配.

总结

以上是内存溢出为你收集整理的xamarin.ios – xamarin组件无法解析程序集全部内容,希望文章能够帮你解决xamarin.ios – xamarin组件无法解析程序集所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1018515.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存