WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
This doesn't happen if you "build" the app (both Debug or Release), but when you "publish" it.
This issue also can be notified in build message when you publish the app:
IL3000: 'System.Reflection.Assembly.Location' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'.
Pull request type
What is the current behavior?
When you Publish the app which is based on one of the templates (Blank/Compact/Fluent), the app will be crashed since
Assembly.GetEntryAssembly()!.Location
inApp.xaml.cs:23
will always returnnull
. https://github.com/lepoco/wpfui/blob/09eeabd684f2e8f242ceff6deb60e1546d2a7bbf/src/Wpf.Ui.Extension.Template.Blank/App.xaml.cs#L23This doesn't happen if you "build" the app (both Debug or Release), but when you "publish" it.
This issue also can be notified in build message when you publish the app:
IL3000: 'System.Reflection.Assembly.Location' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'.
Issue Number: N/A
What is the new behavior?
Other information
Actually the demo app
Wpf.Ui.Demo.Mvvm
already solved this issue like below, so this can be also applied to the template projects. https://github.com/lepoco/wpfui/blob/09eeabd684f2e8f242ceff6deb60e1546d2a7bbf/src/Wpf.Ui.Demo.Mvvm/App.xaml.cs#L30References: