https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.getentryassembly?view=netframework-4.8.1&redirectedfrom=MSDN
Assembly.GetEntryAssembly Method (System.Reflection) | Microsoft Learn
Gets the entry assembly for the running application.
assemblymethodsystemreflectionmicrosoft