I am building a cross platform app using Xamarin and MvvmCross. So far I have worked on the Android version and everything was great. I just started working on the iOS app, create a blank project and tried to add a reference to the MvvmCross binaries. I managed to add references to Cirrious.CrossCore.Touch.dll, Cirrious.MvvmCross.Binding.Touch.dll and Cirrious.MvvmCross.Touch.dll but could not add references to Cirrious.CrossCore.dll, Cirrious.MvvmCross.Binding.dll and Cirrious.MvvmCross.dll. Everytime I try I get the following exception
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
I have looked around but could not find anyone with the same issues. I am not using PCL it is a blank new iOS project.
There are two possible solutions:
Add the references from a NuGet package. You would need the MvvmCross Hot Tuna Starter Pack.
Use the Ninja Coder extensions https://visualstudiogallery.msdn.microsoft.com/618b51f0-6de8-4f85-95ce-a50c658c7767.
Related
I have my the command working when i type it into a regular command prompt. But when i run the command from a batch file using Node.js (child_process) i get a error. I compared the the log files and I got this error.
ArgumentException: Key duplication when adding: PATH
at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00137] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Hashtable.cs:831
at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Hashtable.cs:474
at System.Collections.Specialized.ProcessStringDictionary.Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
at System.Diagnostics.ProcessStartInfo.get_EnvironmentVariables () [0x00000] in <filename unknown>:0
at UnityEditor.WebGL.Emscripten.EmccArguments.SetEnvironmentVariable (System.Diagnostics.ProcessStartInfo startInfo, System.String environmentVariable, System.String value) [0x0001f] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/Emscripten/EmccArguments.cs:32
at UnityEditor.WebGL.Emscripten.EmccArguments.SetupDefaultEmscriptenEnvironment (System.Diagnostics.ProcessStartInfo startInfo) [0x00011] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/Emscripten/EmccArguments.cs:14
at UnityEditor.WebGL.Il2Cpp.WebGLIl2CppNativeCodeBuilder.SetupEnvironment (System.Diagnostics.ProcessStartInfo startInfo) [0x00002] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/Il2Cpp/WebGLIL2CppNativeCodeBuilder.cs:102
at UnityEditorInternal.Il2CppNativeCodeBuilder.SetupStartInfo (System.Diagnostics.ProcessStartInfo startInfo) [0x0000e] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\Il2CppNativeCodeBuilder.cs:109
at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) [0x00034] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:64
at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) [0x0008b] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:380
at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory, Boolean platformSupportsManagedDebugging) [0x002dc] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:361
at UnityEditorInternal.IL2CPPBuilder.Run () [0x00099] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:178
at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001d] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:42
at UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (BuildPostProcessArgs args) [0x000fb] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:367
at UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) [0x002de] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:936
at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00003] in C:\buildslave\unity\build\Editor\Mono\Modules\DefaultBuildPostprocessor.cs:27
at UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x000d9] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:287
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:359)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:254)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:237)
LGDBuildScript:BuildWebProject() (at Assets\Editor\LGDBuildScript.cs:16)
(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Hashtable.cs Line: 831)
I have read all of the child_process documentation and Unity Command Line Arguments documentation and i still can't figure it out.
I'm hoping to have the Unity.exe build my game from my Node.js app.
After update from mvvmcross 4.4.0 to 5.0.5 method ShowViewModel<SettingsViewModel>(); throws System.InvalidCastException. Output is:
mvx:Diagnostic:121.13 Showing ViewModel SettingsViewModel
iOSNavigation:Diagnostic:121.13 Navigate requested
mvx:Diagnostic:121.16 PresentationAttribute not found for SettingsViewController. Assuming animated Child presentation
and a StackTrace :
at MvvmCross.iOS.Views.MvxTabBarViewController.ShowChildView (UIKit.UIViewController viewController) [0x00007] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.iOS.Views.Presenters.MvxIosViewPresenter.ShowChildViewController (UIKit.UIViewController viewController, MvvmCross.iOS.Views.Presenters.Attributes.MvxChildPresentationAttribute attribute, MvvmCross.Core.ViewModels.MvxViewModelRequest request) [0x0004a] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.iOS.Views.Presenters.MvxIosViewPresenter.<RegisterAttributeTypes>b__20_1 (UIKit.UIViewController vc, MvvmCross.iOS.Views.Presenters.Attributes.MvxBasePresentationAttribute attribute, MvvmCross.Core.ViewModels.MvxViewModelRequest request) [0x00000] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.iOS.Views.Presenters.MvxIosViewPresenter.Show (MvvmCross.iOS.Views.IMvxIosView view, MvvmCross.Core.ViewModels.MvxViewModelRequest request) [0x0002c] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.iOS.Views.Presenters.MvxIosViewPresenter.Show (MvvmCross.Core.ViewModels.MvxViewModelRequest request) [0x00009] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.iOS.Views.MvxIosViewDispatcher+<>c__DisplayClass2_0.<ShowViewModel>b__0 () [0x00016] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.iOS.Views.MvxIosUIThreadDispatcher.RequestMainThreadAction (System.Action action) [0x0001f] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.iOS.Views.MvxIosViewDispatcher.ShowViewModel (MvvmCross.Core.ViewModels.MvxViewModelRequest request) [0x00022] in <091ad1c63ffa448eb48cc38964d45708>:0
at MvvmCross.Core.ViewModels.MvxNavigatingObject.ShowViewModelImpl (System.Type viewModelType, MvvmCross.Core.ViewModels.IMvxBundle parameterBundle, MvvmCross.Core.ViewModels.IMvxBundle presentationBundle) [0x0002c] in <ed129c02df414c1d8cea008ca80d94cb>:0
at MvvmCross.Core.ViewModels.MvxNavigatingObject.ShowViewModel (System.Type viewModelType, MvvmCross.Core.ViewModels.IMvxBundle parameterBundle, MvvmCross.Core.ViewModels.IMvxBundle presentationBundle) [0x00000] in <ed129c02df414c1d8cea008ca80d94cb>:0
at MvvmCross.Core.ViewModels.MvxNavigatingObject.ShowViewModel[TViewModel] (MvvmCross.Core.ViewModels.IMvxBundle parameterBundle, MvvmCross.Core.ViewModels.IMvxBundle presentationBundle) [0x00000] in <ed129c02df414c1d8cea008ca80d94cb>:0
at FreQuest.ViewModels.Tabs.MyProfileViewModel.<get_SettingsCommand>b__35_0 () [0x00001] in /Users/pavlomelnyk/frequest-ios-xamarin/FreQuest/ViewModels/Tabs/MyProfileViewModel.cs:114
at MvvmCross.Core.ViewModels.MvxCommand.Execute (System.Object parameter) [0x00009] in <ed129c02df414c1d8cea008ca80d94cb>:0
at MvvmCross.Binding.iOS.Target.MvxUIControlTargetBinding.ControlEvent (System.Object sender, System.EventArgs eventArgs) [0x00025] in <78be62c59fd541e38ea9b95c6cd03bdc>:0
at UIKit.UIControlEventProxy.Activated () [0x00007] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIControl.cs:38
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at FreQuest.iOS.Application.Main (System.String[] args) [0x00001] in /Users/pavlomelnyk/frequest-ios-xamarin/iOS/Main.cs:17
I invoke ShowViewModel<SettingsViewModel>(); in MyProfileViewModel that is in UITabBarController that extends MvxTabBarViewController. My guess is somehow ViewModels related to TabBarContreller do not "see" SettingsViewController.
Has somebody face same issue? Your feedback will be very helpful.
Thanks
I am trying to register the license key by the Application_Start method. When I execute Licensing.RegisterLicense("{LicenseKey}"), the method LicenseUtils.ActivatedLicenseFeatures() returns the value "Text". But when I execute new AppHost().Init(), it gives me the following error:
Application Exception
ServiceStack.LicenseException
The free-quota limit on '10 ServiceStack Operations' has been reached. Please see https://servicestack.net to upgrade to a commercial license or visit https://github.com/ServiceStackV3/ServiceStackV3 to revert back to the free ServiceStack v3.
Description: HTTP 500. Error processing request.
Details: Non-web exception. Exception origin (name of application or object): ServiceStack.Text.
Exception stack trace:
at ServiceStack.LicenseUtils.ApprovedUsage (LicenseFeature licenseFeature, LicenseFeature requestedFeature, Int32 allowedUsage, Int32 actualUsage, System.String message) [0x00026] in <filename unknown>:0
at ServiceStack.LicenseUtils.AssertValidUsage (LicenseFeature feature, QuotaType quotaType, Int32 count) [0x00118] in <filename unknown>:0
at ServiceStack.Host.ServiceMetadata.Add (System.Type serviceType, System.Type requestType, System.Type responseType) [0x002c9] in <filename unknown>:0
at ServiceStack.Host.ServiceController.RegisterService (ITypeFactory serviceFactoryFn, System.Type serviceType) [0x00137] in <filename unknown>:0
at ServiceStack.Host.ServiceController.Register (ITypeFactory serviceFactoryFn) [0x0001a] in <filename unknown>:0
at ServiceStack.Host.ServiceController.Init () [0x00016] in <filename unknown>:0
at ServiceStack.ServiceStackHost.Init () [0x00073] in <filename unknown>:0
at API.Global.Application_Start (System.Object sender, System.EventArgs e) [0x00016] in API/Global.asax.cs:163
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) [0x00038] in /private/tmp/source-mono-mac-4.2.0-branch-c6sr1/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.2/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
Version Information: 4.2.2 (explicit/996df3c Wed Jan 20 00:19:48 EST 2016); ASP.NET Version: 4.0.30319.17020
Powered by Mono
I already tried to update the ServiceStack package, with no success.
This is because you're using a ServiceStack.Text License which only covers usage for the ServiceStack.Text NuGet Package with packages from the full ServiceStack framework.
We are using data binding in our Xamarin.IOS project using MvvmCross(Hot Tuna version) as specified in the sample app “N-39-CrossLight-Touch”.
The sample app as well as our project works fine on simulator(IOS7) but on device(IOS7) it throws the below exception while binding.
System.ArgumentNullException: missing source event info in
MvxWeakEventSubscription Parameter name: sourceEventInfo at
Cirrious.CrossCore.WeakSubscription.MvxWeakEventSubscription2[System.ComponentModel.INotifyPropertyChanged,System.ComponentModel.PropertyChangedEventArgs]..ctor
(INotifyPropertyChanged source, System.Reflection.EventInfo
sourceEventInfo, System.EventHandler1 targetEventHandler) [0x00000] in
:0 at
Cirrious.CrossCore.WeakSubscription.MvxNotifyPropertyChangedEventSubscription..ctor
(INotifyPropertyChanged source, System.EventHandler1
targetEventHandler) [0x00000] in :0 at
Cirrious.CrossCore.WeakSubscription.MvxWeakSubscriptionExtensionMethods.WeakSubscribe
(INotifyPropertyChanged source, System.EventHandler1 eventHandler)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.MvxPropertyInfoSourceBinding..ctor
(System.Object source, System.Reflection.PropertyInfo propertyInfo)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Leaf.MvxLeafPropertyInfoSourceBinding..ctor
(System.Object source, System.Reflection.PropertyInfo propertyInfo)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Leaf.MvxSimpleLeafPropertyInfoSourceBinding..ctor
(System.Object source, System.Reflection.PropertyInfo propertyInfo)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxPropertySourceBindingFactoryExtension.CreateLeafBinding
(System.Object source,
Cirrious.MvvmCross.Binding.Parse.PropertyPath.PropertyTokens.MvxPropertyToken
propertyToken) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxPropertySourceBindingFactoryExtension.TryCreateBinding
(System.Object source,
Cirrious.MvvmCross.Binding.Parse.PropertyPath.PropertyTokens.MvxPropertyToken
currentToken, System.Collections.Generic.List1 remainingTokens,
IMvxSourceBinding& result) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxSourceBindingFactory.TryCreateBindingFromExtensions
(System.Object source,
Cirrious.MvvmCross.Binding.Parse.PropertyPath.PropertyTokens.MvxPropertyToken
propertyToken, System.Collections.Generic.List1 remainingTokens,
IMvxSourceBinding& result) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxSourceBindingFactory.CreateBinding
(System.Object source, IList1 tokens) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxSourceBindingFactory.CreateBinding
(System.Object source, System.String combinedPropertyName) [0x00000]
in :0 at
Cirrious.MvvmCross.Binding.Bindings.SourceSteps.MvxPathSourceStep.OnDataContextChanged
() [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.SourceSteps.MvxSourceStep.set_DataContext
(System.Object value) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.CreateSourceBinding
(System.Object source) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding..ctor
(Cirrious.MvvmCross.Binding.MvxBindingRequest bindingRequest)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder.BindSingle
(Cirrious.MvvmCross.Binding.MvxBindingRequest bindingRequest)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder+<>c_DisplayClass1.b_0
(Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription
description) [0x00000] in :0 at
System.Linq.Enumerable+c__Iterator102[Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription,Cirrious.MvvmCross.Binding.Bindings.IMvxUpdateableBinding].MoveNext
() [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBindingContextOwnerExtensions.AddBindings
(IMvxBindingContextOwner view, IEnumerable1 bindings, System.Object
clearKey) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBindingContextOwnerExtensions.AddBindings
(IMvxBindingContextOwner view, System.Object target, IEnumerable1
bindingDescriptions, System.Object clearKey) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBindingContextOwnerExtensions.AddBinding
(IMvxBindingContextOwner view, System.Object target,
Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription
bindingDescription, System.Object clearKey) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBaseFluentBindingDescription1[MonoTouch.UIKit.UITextField].Apply
() [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxFluentBindingDescriptionSet2[CrossLightTouch.MyViewController,CrossLightTouch.ViewModels.MyViewModel].Apply
() [0x00000] in :0 at CrossLightTouch.MyViewController.ViewDidLoad ()
[0x0024f] in
/Users/admin/Downloads/N-39-CrossLight-Touch/CrossLightTouch/MyViewController.cs:81
at at (wrapper managed-to-native)
MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr) at
MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00008] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIWindow.g.cs:129
at CrossLightTouch.AppDelegate.FinishedLaunching
(MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary
options) [0x00042] in
/Users/admin/Downloads/N-39-CrossLight-Touch/CrossLightTouch/AppDelegate.cs:25
at at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain
(int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main
(System.String[] args, System.String principalClassName, System.String
delegateClassName) [0x0004c] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIApplication.cs:38
at CrossLightTouch.Application.Main (System.String[] args) [0x00008]
in
/Users/admin/Downloads/N-39-CrossLight-Touch/CrossLightTouch/Main.cs:17
By setting the IOS build options -> Link Behavior -> Don’t link , it works on device as expected, but the binary size has been doubled.
You can reproduce this issue with “N-39-CrossLight-Touch” sample.
Is there a fix or alternative for this?
If you don't already have a LinkerPleaseInclude file, copy the one from here into your project:
https://github.com/MvvmCross/MvvmCross/blob/6ab1baa9ca128921208efa994890039edf398474/TestProjects/Android-Support/Fragments/Example.Droid/LinkerPleaseInclude.cs
Also, add the following line to the Include(TextView text) method:
text.AfterTextChanged += (sender, args) => text.Text = "" + text.Text;
If that doesn't solve it, look for other events that may be used in the Mvx bindings and add those to the LinkerPleaseInclude file.
This issue is caused by the dynamic nature of Mvx binding on Android. Because the bindings are resolved at runtime, the Xamarin linker thinks the UI events they reference are not being used so they are removed from the final build. Adding references in the LinkerPleaseInclude file forces them to be included.
we are working in a project involving the use of EMGU and in particoular the SVM functions of OpenCV and we have a problem using Mono on a Ubuntu platform and we don't have this problem on windows. The problem appears when we call the Emgu.CV.ML.SVM.Train method. All the parameters are correct and we canno't debug the wrapped code...
We have tried to increase the Shared Memory and other tricks but it doesn't work.
Do you have any idea?
Thank you
Angelo
Unhandled Exception: Emgu.CV.CvException: OpenCV: requested size is negative or too big
at Emgu.CV.CvInvoke.CvErrorHandler (Int32 status, System.String funcName, System.String errMsg, System.String fileName, Int32 line, IntPtr userData) [0x00000]
at (wrapper native-to-managed) Emgu.CV.CvInvoke:CvErrorHandler (int,intptr,intptr,intptr,int,intptr)
at (wrapper managed-to-native) Emgu.CV.ML.MlInvoke:CvSVMTrain (intptr,intptr,intptr,intptr,intptr,Emgu.CV.ML.Structure.MCvSVMParams)
at Emgu.CV.ML.SVM.Train (Emgu.CV.Matrix`1 trainData, Emgu.CV.Matrix`1 responses, Emgu.CV.Matrix`1 varIdx, Emgu.CV.Matrix`1 sampleIdx, Emgu.CV.ML.SVMParams parameters) [0x00000]
at Segmentation.ImageFeatures.LeafHog.TrainModel (IDictionary`2 dicInOutImage) [0x00000]
at Segmentation.ImageSegmentators.Composite.TrainModel (IDictionary`2 dicInOutImage) [0x00000]
at Segmentation.ImageSegmentators.CompositionMlpRprop.TrainModel (IDictionary`2 dicInOutImage) [0x00000]
at Segmentation.GeneticConfig.ChromoCreator.GetASegmentation (IConfigChromosome configChromosome, IDictionary`2 dicInOutImageTrain) [0x00000]
at Segmentation.GeneticConfig.ConfigChromoProvider.AddChromosomeIfNew (IConfigChromosome chromo) [0x00000]
at Segmentation.GeneticConfig.ConfigChromosome.Generate () [0x00000]
at Segmentation.GeneticConfig.ConfigChromosome..ctor (Int32 chromoLength, IConfigChromoProvider cProvider) [0x00000]
at Segmentation.GeneticConfig.ConfigChromosome.CreateNew () [0x00000]
at AForge.Genetic.Population..ctor (Int32 size, IChromosome ancestor, IFitnessFunction fitnessFunction, ISelectionMethod selectionMethod) [0x00000]
at SegmentationCLI.Program.Main (System.String[] args) [0x00000]