Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Need a way to inform user of Hosting-supported command-line arguments` #693

Closed
dougbu opened this issue Apr 8, 2016 · 12 comments
Closed
Assignees
Milestone

Comments

@dougbu
Copy link
Member

dougbu commented Apr 8, 2016

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

@muratg muratg added this to the 1.0.0 milestone Apr 11, 2016
@muratg
Copy link

muratg commented Apr 11, 2016

@dougbu Were you thinking documentation or cmd line help?

@dougbu
Copy link
Member Author

dougbu commented Apr 11, 2016

Either but command-line help would likely be more discoverable.

@Tratcher
Copy link
Member

Command line help is problematic as hosting does not own Program.Main, the app does.

@dougbu
Copy link
Member Author

dougbu commented Apr 11, 2016

@Tratcher command-line help would depend on a bit o' magic in UseDefaultHostingConfiguration().

@Tratcher
Copy link
Member

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.

@davidfowl
Copy link
Member

Maybe we should just remove support for args and support the config file and env variables by default.

@Tratcher
Copy link
Member

How does that help? Note we need the environment variable support for IIS.

@dougbu
Copy link
Member Author

dougbu commented Apr 11, 2016

Maybe we should just remove support for args and support the config file and env variables by default.

And then document the configuration options Hosting supports for all ASP.NET Core web applications? How would you make that information discoverable?

@davidfowl
Copy link
Member

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.

How does that help? Note we need the environment variable support for IIS.

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...

@Tratcher
Copy link
Member

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.

@davidfowl
Copy link
Member

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.

@davidfowl
Copy link
Member

We're removing these defaults. It's up to the application to handle them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants