0

I ve found an excellent article on working with images in Xamarin. It mentions an option of embedding images into PCL https://developer.xamarin.com/guides/xamarin-forms/user-interface/images/

I ve built my solution with embedded images in PCL and run it in debug mode under UWP. Images show up fine. Then I ve chosen release build. Application builds and runs fine. However, images are not visible.

To debug, I ve borrowed a code to inspect embedded images.

    var assembly = typeof(App).GetTypeInfo().Assembly;
    foreach (var res in assembly.GetManifestResourceNames())
    {
        System.Diagnostics.Debug.WriteLine("found resource: " + res);
    }

In debug DLL they are all in place. In release build resources are empty. What can be the reason? Any advise is much appreciated. Thank you.

Boris Zinchenko
  • 2,142
  • 1
  • 24
  • 34

1 Answers1

0

I followed the suggestion at Why are my Xamarin UWP Images not showing up on device? (provided by ArbiterUnknown) 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 it solved my problem.