GitReleaseNotes icon indicating copy to clipboard operation
GitReleaseNotes copied to clipboard

Better exception when ordinal parameter is not used

Open JakeGinnivan opened this issue 10 years ago • 3 comments
trafficstars

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

JakeGinnivan avatar Sep 30 '15 06:09 JakeGinnivan

:+1: Same problem here.

giggio avatar Oct 02 '15 22:10 giggio

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.

giggio avatar Oct 02 '15 23:10 giggio

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:

pardahlman avatar Jan 21 '16 14:01 pardahlman