-
Notifications
You must be signed in to change notification settings - Fork 311
Decouple ApplicationName from any assembly names #1180
Conversation
@khellang, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the point of this change if consumers of IHostingEnvironment still assume ApplicationName is an assembly name. Save this for 3.0 when we can change both things together.
9aa43a6
to
3599d25
Compare
Haven't we already established that you can't confidently assume that |
No, if it's set, it's an assembly name. Anyone that changes it to something else will soon learn that this assumption is squarely baked in at multiple levels.
The problem is this fixes nothing. Several components use ApplicationName as an assembly name like MVC. This change would have been great to do before 2.0 but now I don't see what you've done besides given people false hope that they can now use ApplicationName when infact it will still break. |
I'd prefer if we introduced a new property in the next major version that was something like |
Alright. You've convinced me. I guess it's too late to do anything about it 😢 |
v3! |
Here's a proposal to fix a couple of issues...
This PR effectively stops using
StartupAssembly
to check whether to scan for anIStartup
type. Instead it always setsStartupAssembly
when callingConfigure
,UseStartup
orUseStartupAssembly
(new), and in addition, it sets a newFindStartupType
key when you need to scan for a startup type.If
StartupAssembly
hasn't been set (no method above has been called), it falls back to the entry assembly name. This fixes #1137.Instead of using
ApplicationName
inHostingStartupAssemblies
, it now usesStartupAssembly
.This means that we no longer use
ApplicationName
for any assembly loading or scanning, it's simply just a string that you can set to whatever you want. This fixes #1179.If an
ApplicationName
hasn't been provided (by the user), it falls back toStartupAssembly
(which could've already fallen back to the entry assembly name).