Assembly.GetEntryAssembly() returns null. Set the Application.ResourceAssembly property or use the pack://application:,/assemblyname;component/ ...