You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having the ability to create an empty builder is amazing, but if my use-case is rather simple - I have to alter the way configuration is loaded into an ASP.NET Core project, for example due to encryption being involved, which basically means using AddJsonStream instead of the default - I'm left with a dozen of questions.
What must I call to achieve the same behavior I was previously getting with the default builder minus X?
I'm left to my own devises, having to scrape what code was added in PRs like #47797 and having to inspect code like HostingBuilderExtensions and other parts here and there, leading to a chaotic experience and definitely missing something somewhere between the lines.
There also appears to be zero official documentation regarding proper usage of CreateEmptyBuilder, or what features it still supports out of the box. The closest thing to a documentation regarding the features set, could be seen in #48811
There's also no guarantee that in doing this approach, I'll always get the same expected behavior, as the code for the default behavior can change with time, which would render the one I copied to try and "mimic" it invalid.
The text was updated successfully, but these errors were encountered:
@eerhardt given that you've worked on some of this relatively recently, would you be open to documenting these two new APIs so that questions like these are addressed in docs?
Having the ability to create an empty builder is amazing, but if my use-case is rather simple - I have to alter the way configuration is loaded into an ASP.NET Core project, for example due to encryption being involved, which basically means using AddJsonStream instead of the default - I'm left with a dozen of questions.
What must I call to achieve the same behavior I was previously getting with the default builder minus X?
I'm not sure starting from "empty" is the best route in your case. If you want mostly the default behavior, minus one thing, it would be better to take the route of removing that one thing. In your case it sounds like you want to remove a configuration source from the ConfigurationManager. You can do this by calling builder.Configuration.Sources.Remove to remove the one you don't want, and then add what you want back in.
Having the ability to create an empty builder is amazing, but if my use-case is rather simple - I have to alter the way configuration is loaded into an ASP.NET Core project, for example due to encryption being involved, which basically means using
AddJsonStream
instead of the default - I'm left with a dozen of questions.What must I call to achieve the same behavior I was previously getting with the default builder minus X?
I'm left to my own devises, having to scrape what code was added in PRs like #47797 and having to inspect code like HostingBuilderExtensions and other parts here and there, leading to a chaotic experience and definitely missing something somewhere between the lines.
There also appears to be zero official documentation regarding proper usage of
CreateEmptyBuilder
, or what features it still supports out of the box. The closest thing to a documentation regarding the features set, could be seen in #48811For example, currently, I'm unsure if I am to do
versus a simple
There's also no guarantee that in doing this approach, I'll always get the same expected behavior, as the code for the default behavior can change with time, which would render the one I copied to try and "mimic" it invalid.
The text was updated successfully, but these errors were encountered: