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
Show help when no args are passed #596
Conversation
<value>Scaffolding failed.</value> | ||
</data> | ||
<data name="NoCodeGeneratorsFound" xml:space="preserve"> | ||
<value>No codegenerators are available in this project. Please add 'Microsoft.VisualStudio.Web.CodeGeneration.Design' NuGet package to the project.</value> |
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.
Nit: "code generators" maybe?
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.
Also: Please add **the** 'foobar' ...
This seems like a pretty large change (200+ lines) for something that on the surface sounds quite straightforward. Is there no simpler way to handle this case? |
The large part of the change is wrapping the entry points in a try-catch block (which has caused indentation changes). |
Is there no way to just detect that there are no args and show the help info? |
Also, even without the white space changes, it's still 150 lines... |
There is a way to just detect that with smaller number of changes.
This currently causes dotnet.exe to crash as exceptions are thrown and not handled gracefully. So yes, this PR does more than advertised earlier:
|
I see, so this change is really about "do better handling of all cases of invalid/missing/whatever command line args"? |
yes, that is correct. |
Ok, it's up to you and @mlorbetske to figure out the best change. In general for patches we try to address just the affected issue or else we risk regressions, so do whatever you feel is best. |
Discussed this with @mlorbetske. We decided to take this as its a relatively safe change and provides a better user experience by not letting dotnet.exe crash with exceptions due to invalid/ missing command line arguments. |
Fixes #588
cc @mlorbetske @Eilon