无法添加对Cirrious.CrossCore.dll的引用

时间:2014-01-02 12:48:07

标签: xamarin.ios mvvmcross xamarin-studio

我正在使用XamarinMvvmCross构建跨平台应用。到目前为止,我已经研究过Android版本,一切都很棒。我刚刚开始研究iOS应用程序,创建一个空白项目,并尝试添加对MvvmCross二进制文件的引用。我设法添加了对Cirrious.CrossCore.Touch.dllCirrious.MvvmCross.Binding.Touch.dllCirrious.MvvmCross.Touch.dll的引用,但无法添加引用to Cirrious.CrossCore.dllCirrious.MvvmCross.Binding.dllCirrious.MvvmCross.dll。我每次尝试都会得到以下异常

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
  at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00045] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System/AppDomain.cs:803 
  at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string,System.Security.Policy.Evidence,bool)
  at System.Reflection.Assembly.ReflectionOnlyLoad (System.String assemblyString) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/Assembly.cs:599 
  at IKVM.Reflection.Universe.DefaultResolver (System.String refname, Boolean throwOnError) [0x0001f] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Universe.cs:814 
  at IKVM.Reflection.Universe.Load (System.String refname, IKVM.Reflection.Module requestingModule, Boolean throwOnError) [0x0002b] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Universe.cs:768 
  at IKVM.Reflection.Reader.ModuleReader.ResolveAssemblyRefImpl (IKVM.Reflection.Metadata.Record& rec) [0x000b4] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Reader/ModuleReader.cs:523 
  at IKVM.Reflection.Reader.ModuleReader.ResolveAssemblyRef (Int32 index) [0x0004b] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Reader/ModuleReader.cs:506 
  at IKVM.Reflection.Reader.ModuleReader.ResolveType (Int32 metadataToken, IGenericContext context) [0x000e9] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Reader/ModuleReader.cs:389 
  at IKVM.Reflection.Module.ResolveType (Int32 metadataToken, IKVM.Reflection.Type[] genericTypeArguments, IKVM.Reflection.Type[] genericMethodArguments) [0x00025] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Module.cs:433 
  at IKVM.Reflection.Module.ResolveType (Int32 metadataToken) [0x00005] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Module.cs:400 
  at IKVM.Reflection.Reader.ModuleReader.GetMemberRef (Int32 index, IKVM.Reflection.Type[] genericTypeArguments, IKVM.Reflection.Type[] genericMethodArguments) [0x000fd] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Reader/ModuleReader.cs:813 
  at IKVM.Reflection.Reader.ModuleReader.ResolveMethod (Int32 metadataToken, IKVM.Reflection.Type[] genericTypeArguments, IKVM.Reflection.Type[] genericMethodArguments) [0x00066] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Reader/ModuleReader.cs:717 
  at IKVM.Reflection.Module.ResolveMethod (Int32 metadataToken) [0x00005] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/Module.cs:441 
  at IKVM.Reflection.CustomAttributeData.get_Constructor () [0x00013] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/CustomAttributeData.cs:571 
  at IKVM.Reflection.CustomAttributeData.get_AttributeType () [0x00002] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ikvm/reflect/CustomAttributeData.cs:562 
  at MonoDevelop.IPhone.IPhoneProject.<IsAssemblyCallingNativeCode>m__15 (IKVM.Reflection.CustomAttributeData a) [0x00001] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProject.cs:343 
  at System.Linq.Enumerable.Any[CustomAttributeData] (IEnumerable`1 source, System.Func`2 predicate) [0x0001a] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/System.Core/System.Linq/Enumerable.cs:146 
  at MonoDevelop.IPhone.IPhoneProject.IsAssemblyCallingNativeCode (System.String file) [0x0003d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProject.cs:343 
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator34`1[System.String].MoveNext () [0x00044] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/System.Core/System.Linq/Enumerable.cs:3127 
  at MonoDevelop.IPhone.IPhoneProject.ValidateReference (Xamarin.Components.Ide.Activation.XamarinEntitlements entitlements, MonoDevelop.Projects.ProjectReference reference) [0x00083] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProject.cs:309 
  at Xamarin.Ide.ActivationHelper.FindReferencesRequiringUpgrade (IXamarinProject project, Xamarin.Components.Ide.Activation.XamarinEntitlements entl, System.Collections.Generic.List`1 references, System.Collections.Generic.List`1& reasons, System.Collections.Generic.List`1& delayedReferences) [0x00029] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Accounts/ActivationHelper.cs:141 
  at Xamarin.Ide.ActivationHelper.ReferenceValidator (System.Object sender, MonoDevelop.Ide.EditReferencesEventArgs e) [0x00066] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Accounts/ActivationHelper.cs:90 
  at MonoDevelop.Ide.ProjectOperations.AddReferenceToProject (MonoDevelop.Projects.DotNetProject project) [0x0010b] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:769 
  at MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectReferenceFolderNodeCommandHandler.AddReferenceToProject () [0x00023] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceFolderNodeBuilder.cs:210 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MonoMethod.cs:230 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MonoMethod.cs:238 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MethodBase.cs:114 
  at MonoDevelop.Components.Commands.DefaultCommandHandler.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x00019] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:2094 
  at MonoDevelop.Components.Commands.CustomCommandTargetAttribute.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x00009] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CustomCommandTargetAttribute.cs:101 
  at MonoDevelop.Ide.Gui.Components.NodeCommandHandler+TransactedNodeHandlerAttribute.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x0002d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/NodeCommandHandler.cs:296 
  at MonoDevelop.Components.Commands.CustomCommandTargetAttribute.MonoDevelop.Components.Commands.ICommandTargetHandler.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x00004] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CustomCommandTargetAttribute.cs:58 
  at MonoDevelop.Components.Commands.CommandHandlerInfo.Run (System.Object cmdTarget, MonoDevelop.Components.Commands.Command cmd) [0x00021] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1963 
  at MonoDevelop.Components.Commands.CommandManager+<DispatchCommand>c__AnonStorey82.<>m__D2 () [0x0005f] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1054 
  at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x002b0] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1071 

我环顾四周但找不到任何有同样问题的人。我没有使用PCL这是一个空白的新iOS项目。

1 个答案:

答案 0 :(得分:0)

有两种可能的解决方案: