The offending code: public static ImageSource AppIcon{ get{ if (appIcon == null){ var path = System.Reflection.Assembly.GetEntryAssembly().Location; Problem is that for this type of application the EntryAssembly is null.