-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting ApplicationName to random value when using CreateDefaultBuilder fails in Development #44467
Comments
You should not use Related issues and PRs: |
Thank you for the details @sakno, if it required to be an executing assembly name (I'm not sure is it the case for Asp Net Core or for all application using GenericHost but looks like all of them need it) then maybe it should in fail in all cases not only with some special preconditions like using dev environment, also using other assembly names (ex, Maybe it should fail during Also @sakno in your comment "Check this line of code for more details." |
Oops, sorry for my inattention. Yes, it's the same line of code. I also tried to use this property for app name but without luck. There are many places especially in ASP.NET Core MVC utilizing its special meaning. |
Tagging subscribers to this area: @eerhardt, @maryamariyan Issue meta data
|
Closing issue as by design |
@maryamariyan should not docs and error message be more explicit about this problem? |
If you are using
Host.CreateDefaultBuilder(args)
to createHostBuilder
, set environment toDevelopment
and set application name to a value other then assembly names used in this project following code path will fail withFileNotFoundException
:To me, it looks like it should not fail the whole host while trying to load dev secrets based on application name or if it's intended behavior then limitations in application name values should be specified clearly.
Code to reproduce
Or
Exception Information
Message:
StackTrace:
The text was updated successfully, but these errors were encountered: