-
Notifications
You must be signed in to change notification settings - Fork 311
Need a way to inform user of Hosting-supported command-line arguments` #693
Comments
@dougbu Were you thinking documentation or cmd line help? |
Either but command-line help would likely be more discoverable. |
Command line help is problematic as hosting does not own Program.Main, the app does. |
@Tratcher command-line help would depend on a bit o' magic in |
UseDefaultHostingConfiguration doesn't control the flow of the application. It can't terminate the app if there's a "--help" in the config, it doesn't control when Main exits. |
Maybe we should just remove support for args and support the config file and env variables by default. |
How does that help? Note we need the environment variable support for IIS. |
And then document the configuration options Hosting supports for all ASP.NET Core web applications? How would you make that information discoverable? |
Docs, like the other things of the same nature.
Not sure what you mean. The entire issue is about obscure command line arguments. We don't own the program so showing help is kinda odd. Env variables and config would still be supported... |
Oh, nevermind, I read that as "Maybe we should just remove support for the config file and env variables by default." Args are useful during development and maybe even in production. Removing them does not address the undiscoverable nature of configuring Hosting, it just makes configuring Hosting even more difficult. |
I think the big difference between args and the other things it that it collides with the real application's args. That's why it's messy and sure you can say it doesn't address the problem but it makes it more difficult to reason about. When it comes down to it, we have a hosting API and nothing more. The way you discover what APIs do is via intellisense and documentation. |
We're removing these defaults. It's up to the application to handle them. |
Command-line arguments such as
--contentRoot {root}
are<sarcasm>
💯% discoverable</sarcasm>
-- if you've received the right email from @NTaylorMullen or are reading the code. Users are not even informed that all supported options are name / value pairs, let alone that they map to configuration options. Then, there's nothing available to list the configuration options that Hosting (in particular) supports.Part of this may be an
aspnet/Configuration
bug. But the end-to-end experience isn't great either way./cc @danroth27 @glennc
The text was updated successfully, but these errors were encountered: