Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Better exception when ordinal parameter is not used #91

Open
JakeGinnivan opened this issue Sep 30, 2015 · 3 comments
Open

Better exception when ordinal parameter is not used #91

JakeGinnivan opened this issue Sep 30, 2015 · 3 comments

Comments

@JakeGinnivan
Copy link
Contributor

Unhandled Exception: System.InvalidOperationException: Number of ordinal arguments must at least {0}.
   at Args.ModelBindingDefinition`1.EnsureCorrectNumberOfOrdinalArguments(IEnumerable`1 ordinalArgs)
   at Args.ModelBindingDefinition`1.BindModel(TModel model, IEnumerable`1 args)
   at Args.ModelBindingDefinition`1.CreateAndBind(IEnumerable`1 args)
   at GitReleaseNotes.Program.Main(String[] args) in C:\projects\gitreleasenotes\src\GitReleaseNotes\Program.cs:line 32
@giggio
Copy link

giggio commented Oct 2, 2015

👍
Same problem here.

@giggio
Copy link

giggio commented Oct 2, 2015

Ok, you have to do GitReleaseNotes.exe . /OutputFile ReleaseNotes.md. The dot is the secret, it is the working directory. If you run GitReleaseNotes.exe /? you will see the options.
The docs are not correct, they do not mention that. And the app should not throw an exception, it should say what is missing.
I suggest docopt .net to make that easier and follow standards.

@pardahlman
Copy link

Same problem for me. I missed the working directory parameter. Looking at the README.md file in the repo it states that

GitReleaseNotes must be run inside a git repository.
GitReleaseNotes.exe /OutputFile ReleaseNotes.md
This will write ReleaseNotes.md into the root of your repo, the release notes are generated by:

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

No branches or pull requests

3 participants