GitReleaseNotes icon indicating copy to clipboard operation
GitReleaseNotes copied to clipboard

GitReleaseNotes.exe /OutputFile CHANGELOG.md throws exception

Open mrbelk opened this issue 10 years ago • 13 comments
trafficstars

When I try to run this command from within my repo, I get the following error:

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

When I try to run the tool specifying the WorkingDirectory (of "."), I get nothing. When I specify /Verbose, I can't find where a logfile might be created and there is no verbose logging emitted to the console (Powershell).

What might I be doing wrong?

mrbelk avatar Oct 12 '15 19:10 mrbelk

Try

Gitreleasenotes . /o changelog.md

Sent from my Windows Phone


From: mrbelkmailto:[email protected] Sent: ‎13/‎10/‎2015 3:05 AM To: GitTools/GitReleaseNotesmailto:[email protected] Subject: [GitReleaseNotes] GitReleaseNotes.exe /OutputFile CHANGELOG.md throws exception (#95)

When I try to run this command from within my repo, I get the following error:

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

When I try to run the tool specifying the WorkingDirectory (of "."), I get nothing. When I specify /Verbose, I can't find where a logfile might be created and there is no verbose logging emitted to the console (Powershell).

What might I be doing wrong?

— Reply to this email directly or view it on GitHubhttps://github.com/GitTools/GitReleaseNotes/issues/95.

JakeGinnivan avatar Oct 13 '15 00:10 JakeGinnivan

no joy. Same error.

mrbelk avatar Oct 13 '15 12:10 mrbelk

Hello i have the same issue with version 0.7.1 installed by chocolatey.

The command Gitreleasenotes /O test.md it does generate the following exception:

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

The command Gitreleasenotes . /O test.md it does not generate any error but no file is created.

xpicio avatar Nov 03 '15 11:11 xpicio

Any movement on this issue? Would really like to use this tool for building ReleaseNotes. The GitVersion stuff is great, and this would be a nice companion for that.

mrbelk avatar Dec 14 '15 13:12 mrbelk

I installed mine using Chocolatey, and it worked for the first time (although the tags were not ordered correctly) using gitreleasenotes . /o notes.md /alltags /verbose. However, after deleting the output file and re-running the command-line, nothing happens. No exception, no nothing. Had the same thing the last time I tried this project.

dennisdoomen avatar Feb 06 '16 10:02 dennisdoomen

I haven't tried replicating this yet, but perhaps your working directory is not what you believe it to be? Can you try, rather than a ".", specify the full path to your repo directory?

dazinator avatar Feb 06 '16 11:02 dazinator

image

The first time it works, the next time nothing happens. As if it is keeping some state somewhere.

dennisdoomen avatar Feb 06 '16 11:02 dennisdoomen

A while back a bunch of stuff got broken, at the moment I am just using gitreleasenotes . /o newrelease.md.

Because it work enough for me I haven't got back to it :(

JakeGinnivan avatar Feb 06 '16 12:02 JakeGinnivan

Had the same exception as in https://github.com/GitTools/GitReleaseNotes/issues/95#issue-111035509.

Adding "." as working directory worked for me. Also multiple times in a row.

mkoertgen avatar Feb 11 '16 11:02 mkoertgen

The point is that it doesn't throw anything. It just doesn't work anymore.

dennisdoomen avatar Feb 11 '16 12:02 dennisdoomen

Once GitTools.Core is stable enough, we will give this component some love again.

GeertvanHorrik avatar Feb 11 '16 13:02 GeertvanHorrik

:+1:

dennisdoomen avatar Feb 11 '16 13:02 dennisdoomen

This is caused by the first argument being a switch (arg preceded by /). First argument must always be the WorkingDirectory path because of the ArgsMemberSwitch attribute on GitReleaseNotesArguments

I discovered this the hard way by debugging! The /? doc is incorrect!

aateeque avatar Mar 02 '16 16:03 aateeque