0

I am developing a Xamarin UWP app using ffimageloading. The images show up just fine on the Windows Phone emulator that I am running through Visual Studio, but when I deploy it to a device through the device portal all of the images are missing.

 <ffimageloading:CachedImage Grid.Column="0" Grid.Row="1" 
    Source="{helpers:ImageResource MyProject.Assets.Images.music-doublenote.png}" />
Cœur
  • 37,241
  • 25
  • 195
  • 267
ArbiterUnknown
  • 113
  • 2
  • 13
  • 1
    It appears that this is only an issue in release builds – ArbiterUnknown May 19 '16 at 19:31
  • Have you tried checking if it is the helper, that causes the problem (aka: Using a fixed path as source)? – Kai Brummund May 19 '16 at 20:18
  • Yeah getting rid of the helper and then adding the file directly to the project works. But the app itself runs really slow on release builds as well so i thought it might be another issue. I ended up turning off "Compile with .NET Native tool chain" on the Build tab of Properties for the release configuration for the main UWP app because that was how it is configured in Debug. – ArbiterUnknown May 19 '16 at 20:32
  • Release wasn't working on the emulator either until i fixed that issue. Now release is working on the emulator but I am getting a deploy error to my device: Failure reason: Failed to start deployment. Failure text: Package failed updates, dependency or conflict validation. (0x80073cf3) – ArbiterUnknown May 19 '16 at 20:32

4 Answers4

2

The issue was the build configuration. By turning off "Compile with .NET Native tool chain" on the Build tab of Properties for the Release configuration of the main UWP app and deploying the app with WinAppDeployCmd.exe

ArbiterUnknown
  • 113
  • 2
  • 13
0

I had the same problem whenever I kept the image file inside any folder (for. eg assests). But later i started keeping the images file in the main project folder; I didn't keep them inside any folders and they started to show up in the application.

Raxak
  • 389
  • 3
  • 17
0

To get "Compile with .NET Native tool chain" working you have to use UWP-specific overload of the Forms.Init call which allows to correctly include FFImageLoading assemblies for Xamarin.Forms usage:

// you'll need to add `using System.Reflection;`
List<Assembly> assembliesToInclude = new List<Assembly>();

//Now, add in all the assemblies your app uses
assembliesToInclude.Add(typeof (FFImageLoadingAssembliesHere).GetTypeInfo().Assembly);

//Also do this for all your other 3rd party libraries

Xamarin.Forms.Forms.Init(e, assembliesToInclude);
// replaces Xamarin.Forms.Forms.Init(e);
Daniel Luberda
  • 7,374
  • 1
  • 32
  • 40
0

I also had the issue with images not showing up on my UWP app. The images were showing up on my Android project but not UWP. For me the solution was to add the file extension. For some reason "myimage" works on Android but not on UWP, has to include the file extension like "myimage.png". Just wanna leave this here for anyone else potentially experiencing the same issue.

SendETHToThisAddress
  • 2,756
  • 7
  • 29
  • 54