In MvvmCross 4.0.0 the Community SQLite plugin has been replaced with new SQLite-PCL plugin (if I am not mistaken).
It works great in my Android application, but when I tried to use it in WPF application I faced problems.
When package is installed from nuget there's no default Bootstrap file, therefore Mvx runtime fails to resolve classes like MvxSqliteConnectionFactory.
When I add bootstrap code manually I get error like:
A first chance exception of type Cirrious.CrossCore.Exceptions.MvxException occurred in WindowsBase.dll
Version Unknown : Time 26/10/2015 08:53:16.232 PM: Error : 1.30 Exception: could not load plugin assembly for type MvvmCross.Plugins.Sqlite.PluginLoader
I figured that runtime is not able to load assembly probably because it does lookup by appending .Wpf suffix to the name of the plugin, so it looks for assembly MvvmCross.Plugins.Sqlite.Wpf or something like that. But there's no such library, in repository there's only WindowsUWP version.
What can I do to fix the problem and how do I use this plugin in WPF app?
WPF plugin added to MvvmCross repos, please check out the latest prerelease version.
Related
I've got a project that I need to Migrate from .NET Framework to .NET Core. After migrating it I've noticed an exception –
Unity.Exceptions.ResolutionFailedException HResult=0x80131500
Message=Resolution of the dependency failed, type =
'LanDocs.ExchangeSystem.Server.Interfaces.IExchangeDataHandler', name
= '(none)'. Exception occurred while: while resolving. Exception is: InvalidOperationException - You cannot have more than one dynamic
module in each dynamic assembly in this version of the runtime.
What might be the issue and how to fix it?
I've figured it out myself and decided to share the solution here since I haven't found anything helpful while struggling with it.
The issue was with Policy Injection – once I've removed the entire section everything worked well.
But the problem was the version of version of nuget package. I've had Unity.Interception with version 5.5.3 and Unity with version 5.8.6. Once I've changed both versions to 5.11.1 everything worked well on .NET Core.
I get many error messages if I install the Xamarin.Firebase.iOS.CloudMessaging 3.1.2 nuget package.
Error: linker command failed with exit code 1 (use -v to see invocation)
Error MT5210: Native linking failed, undefined symbol: _FIRLogBasic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Error MT5211: Native linking failed, undefined Objective-C class:
FIROptions. The symbol '_OBJC_CLASS_$_FIROptions' could not be found
in any of the libraries or frameworks linked with your application.
Error MT5211: Native linking failed, undefined Objective-C class:
GULAppEnvironmentUtil. The symbol
'_OBJC_CLASS_$_GULAppEnvironmentUtil' could not be found in any of the
libraries or frameworks linked with your application.
Error MT5201: Native linking failed. Please review the build log and
the user flags provided to gcc: -ObjC
Error MT5202: Native linking failed. Please review the build log.
I tried uninstalling and reinstalling the nuget package but I still get the same errors.
I use Visual Studio Community for Mac 8.1.5 (build 9).
I need Xamarin.Firebase.iOS.CloudMessaging because I follow this tutorial: https://www.robbiecode.com/setup-push-notifications-with-firebase-in-xamarin-forms-for-ios/
What is wrong with my project? What can I do?
The following two projects are in my solution:
InapppurchaseTest.iOS, MonoGame.Framework.iOS (develop)
Well, this is a well-known issue with Firebase and Xamarin, what basically happens here is the old bin and obj files while interacting with the new data override some existing files that are needed by iOS to synthesize the IPA while deployment and hence ends up throwing linking RELATED errors, follow the below steps and it will clear this mess.
Clean bin and obj
Delete the builds in the following path of your MAC machine - ~/Library/Caches/Xamarin/mtbs/builds/ProjNAME where 'ProjName' is the name of the project you are currently working on
Once you are done with both the above steps add the Xamarin.Firebase.iOS.CloudMessaging package and change linker setting to Don't Link (this is for the time being)
After installing these packages see to it that you build your project dependency wise which means PCL'S and .Net standards first then the native iOS project.
Clean bin and obj again if it does not work for the first build...
This should solve your issues in case it does not repeat the above procedure.
EDIT
If you check the GitHub comment by SotoiGhost here, it says adding the below line anywhere in your project should solve this issue...
var foo = Firebase.Core.Configuration.SharedInstance;
Feel free to get back in case of issues
Good luck!
I am trying to use DacFx in my application. I have installed DacFx package from nuget with command:
Install-Package Microsoft.SqlServer.DacFx.x64
After that, I am following this guide:
http://blogs.msmvps.com/deborahk/deploying-a-dacpac-with-dacfx-api/
But, on the line
dacServiceInstance.Deploy
I get System.IO.FileLoadException while trying to load "Microsoft.Data.Tools.Schema.Sql.resources, Version=13.0.0.0, Culture=ru-RU, PublicKeyToken=b03f5f7f11d50a3a"
Library is at the place, but for additional information I have this text (unlocalized by me) in FusionLog property of exception:
The located assembly's manifest definition does not match the assembly reference: CULTURE
Failed to complete setup of assembly (hr = 0x80131040)
As I can suppose, framework is trying to load this assembly, but somehow manifest culture differs from actual culture. What can I do with this?
Nuget package used: Microsoft.SqlServer.DacFx.x64 version 130.3485.1
Application is Windows desktop application with WPF, no MVC or other web stuff.
I am using MSVS 2013, Windows 7 Russian(I think, that it can be the part of the problem)
UPDATE: Workaround exists by changing local culture to "en-US". It seems that any method of changing it works, because Fusion (.Net assembly loader) then doesn't try to load resource assembly. Checked other cultures, like "pt-BR", all are broken with the same error as "ru-RU". I don't know, maybe it is a nuget package glitch.
Now I have inserted
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
in my application and everything works. Please, post a comment, if there is more convenient way to workaround this without changing culture of the application.
Okay, I got it.
MSVS 2013 - latest updates, latest SSDT - doesn't work with culture other than "en-US". Tried Nuget package from question, separate DacFx.msi from MS - NO EFFECT.
MSVS 2015 - latest updates, latest SSDT - works perfectly with any culture.
We have a custom JSON WCF binding that we use in our .net SDK (to support JSON similar to the WebHttpBinding). Our SDK is a PCL supporting .net 4.5, Win8, IOS, Android profile - It works in our Windows Desktop application, and Android without any problem. We are just diving into MonoTouch, and have been tracing down why our custom WCF bindings were not working correctly. We were able to identify that in our WCF class that implements the System.ServiceModel.Description.IOperationBehavior interface, MonoTouch fails when trying to handle System.ServiceModel.Dispatcher.ClientOperation.
The exact error is mono "Could not load the signature of (our custom type) Failed for unknown reasons."
When I configure the .csproj Linker Options to "Link SDK assemblies only" and attempt to compile, I get the error:
Xamarin.iOS 8.6.1 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk
MTOUCHTASK: error MT2002: Failed to resolve "System.ServiceModel.Dispatcher.ClientOperation" reference from "System.ServiceModel.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Task "MTouchTask" execution --
Looking for any kind of work around, as we need the client operation to configure the "Formatter" property when passed in via the ApplyClientBehavior method.
Any assistance would be greatly appreciated.
I submitted this problem to Xamarin, and they confirmed that my report is a bug in Mono 3.1 - they have resolved it in Mono 4.0 but that is not out yet at the time of this writing. Hope this helps someone else out who might spend hours trying to resolve it.
Issue was the PCL library ClientOperation wouldn't work, but under the MonoTouch assmebly it was fine. Xamarin opened a private bug, so I don't have a reference number.
I'm unable to build Xamarin projects that reference MvvmCross as I receive the error:
Error MT3001: Could not AOT the assembly '/Users/chriskoiak/Documents/Initial/Mobile Clients/xxxx/obj/iPhone/Debug/mtouch-cache/Build/Cirrious.CrossCore.dll' (MT3001)
Error MT3001: Could not AOT the assembly '/Users/chriskoiak/Documents/Initial/Mobile Clients/xxxx/obj/iPhone/Debug/mtouch-cache/Build/Cirrious.MvvmCross.dll' (MT3001)
This error occurred after I upgraded to xcode5, mvvmcross 3.0.12 Xamarin.iOS 7.0.0.11
Has anyone else experienced this problem or can suggest a fix?
Thanks
This is a little bug that has appeared in the initial Xamarin.iOS 7 release, caused by the transition to "real" PCL reference assemblies on OS X. The developers are working to get this fixed right away, but in the meantime there is a work-around. Specifically, you can add -linkskip=System.Net -linkskip=System.Windows to the "Additional mtouch arguments" under Project Options -> Build -> iOS Build. This will tell the linker not to try to link System.Net or System.Windows.
Update:
A corrected version of Xamarin.iOS (7.0.1) has now been released to the alpha channel. When using this latest version, the linksip work-around should no longer be needed.