GetApplicationPartManager uses environment variable ApplicationName to get entryAssemblyName is that the expected behavior? If we override ApplicationName, app crashes #47643
Labels
area-web-frameworks
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Summary
GetApplicationPartManager does var entryAssemblyName = environment?.ApplicationName; and hence
taking the entryAssemblyName from the environment variable ApplicationName.
But the environment variable ApplicationName can be overridden.
For existing application that override the ApplicationName, which indeed by default holds the assembly name, this will cause the app to crash.
Is there another way to set the entryAssemblyName in the code that does not depend on an environment variables?
Motivation and goals
Change the existing logic for setting entryAssemblyName to something that doesn't depend on environment variables.
Hence existing applications that override ApplicationName default value will not crash and new applications will have the
ability to set ApplicationName to something other than the default value if needed.
Examples
Adding for example
in our application will fail in case the ApplicationName has been overridden and doesn't hold the default assembly name.
The text was updated successfully, but these errors were encountered: