GitTools / GitReleaseNotes

Easily generate release notes
MIT License
173 stars 52 forks source link

Better exception when ordinal parameter is not used #91

Open JakeGinnivan opened 9 years ago

JakeGinnivan commented 9 years ago
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 commented 9 years ago

:+1: Same problem here.

giggio commented 9 years ago

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 commented 8 years ago

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: