-
Notifications
You must be signed in to change notification settings - Fork 1
[UWP]Plugins PictureChooser PluginLoader can`t load #143
Comments
You need to add bootstrap file for it manually. |
I've already done that. After adding the bootstrap file: using MvvmCross.Platform.Plugins;
On launching I've got an MvxException at setup.Initialize() with message: could not load plugin assembly for type MvvmCross.Plugins.PictureChooser.PluginLoader. I've checked that project has reference to MvvmCross.Plugin.PictureChooser assembly and that on bin\x64\Debug the MvvmCross.Plugins.PictureChooser.dll and MvvmCross.Plugins.PictureChooer.WindowsStore.dll are present. |
I see the problem it looks for WindowsUWP and WindowsCommon, but it is the WindowsStore dll that is added to the project. |
I supposed that, but I haven't found any version of the dll for UWP in the package. Platform targets for the package does not include 'uap10.0', which is found in other plugins (SQLitePCL for example). |
Let me see if I can cook it up for WindowsUWP, otherwise if you want to have a stab at it feel welcome to do so. |
The plugin has a WindowsStore dll which I think works fine in UWP projects if you override CreatePluginManager and add the .WindowsStore dll postfix. Is there a reason not to always search for WindowsStore if WindowsUWP or WindowsCommon don't exist? |
I don't think it is correct to always dump win8.1 into UWP projects? What happens if you run that on a phone? Wouldn't it expect wpa8.1 in that case? |
I guess so, I haven't actually tried it... |
https://github.com/MvvmCross/MvvmCross-Plugins/tree/picturechooser_uwp I've added an UWP implementation. It is just linking in the Store version as the API seems to be the same. I don't have a Windows Phone around so can't test on that. |
You can try this nuget locally and see if it works for you. |
I've tried on my W10M and now it doesn't throw any exception, the camera launches and the picture is taken and confirmed! But when I want to bind it to a Image control in the View it looks awkward. Please find it in the attached file. The code used is this (Xamarin Forms):
|
What is Photo and what is ImageSource? I've only tried with a picture from the file picker which worked. |
Photo is a Xamarin.Forms.ImageSource that I use for binding with the view. Let me show you the full relevant code for the ViewModel:
And this is the View:
I'm using Xamarin.Forms + MVVMCross |
Must be something wrong with the conversion of the stream to bitmap in Forms. If I use the native Image view and the MvxInMemoryImageValueConverter it works just fine. As you can see I captured a picture of my mug just fine.
And View:
|
As I'm using Xamarin.Forms for sharing the views (and TBH I'm all new in this Xamarin world), I will keep using Xam.Plugin.Media which seems to work just fine with similar implementation. Anyway, the issue with the UWP assembly seems to be solved, so thank you for your help!! |
Some time ago an UWP PictureChooser issue was asked to be created in this repository for follow up, but I've found no further reference in here
MvvmCross/MvvmCross#1258
Today I was trying with version 4.4 and same error happened to me
The text was updated successfully, but these errors were encountered: