Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions FluentWPF/Utility/IconHelper.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
Expand All @@ -19,8 +15,10 @@ public static ImageSource AppIcon
{
if (appIcon == null)
{
var path = System.Reflection.Assembly.GetEntryAssembly().Location;
appIcon = GetIcon(path);
var assembly = System.Reflection.Assembly.GetEntryAssembly();
assembly ??= System.Reflection.Assembly.GetExecutingAssembly();

appIcon = GetIcon(assembly.Location);
}
return appIcon;
}
Expand Down