Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit f443d03

Browse files
authored
Fix TraceSource handling of GetEntryAssembly (#29228)
1 parent 350f931 commit f443d03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceInternal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ internal static string AppName
5656
{
5757
if (s_appName == null)
5858
{
59-
s_appName = Assembly.GetEntryAssembly().GetName().Name;
59+
s_appName = Assembly.GetEntryAssembly()?.GetName().Name ?? string.Empty;
6060
}
6161
return s_appName;
6262
}

0 commit comments

Comments
 (0)