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

GitReleaseNotes.exe /OutputFile CHANGELOG.md throws exception #95

Open
mrbelk opened this issue Oct 12, 2015 · 13 comments
Open

GitReleaseNotes.exe /OutputFile CHANGELOG.md throws exception #95

mrbelk opened this issue Oct 12, 2015 · 13 comments

Comments

@mrbelk
Copy link

mrbelk commented Oct 12, 2015

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?

@JakeGinnivan
Copy link
Contributor

Try

Gitreleasenotes . /o changelog.md

Sent from my Windows Phone


From: mrbelkmailto:notifications@github.com
Sent: ‎13/‎10/‎2015 3:05 AM
To: GitTools/GitReleaseNotesmailto:GitReleaseNotes@noreply.github.com
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//issues/95.

@mrbelk
Copy link
Author

mrbelk commented Oct 13, 2015

no joy. Same error.

@xpicio
Copy link

xpicio commented Nov 3, 2015

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.

@mrbelk
Copy link
Author

mrbelk commented Dec 14, 2015

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.

@dennisdoomen
Copy link

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.

@dazinator
Copy link
Member

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?

@dennisdoomen
Copy link

image

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

@JakeGinnivan
Copy link
Contributor

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 :(

@mkoertgen
Copy link

Had the same exception as in #95 (comment).

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

@dennisdoomen
Copy link

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

@GeertvanHorrik
Copy link
Contributor

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

@dennisdoomen
Copy link

👍

@aateeque
Copy link

aateeque commented Mar 2, 2016

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!

asbjornu added a commit to asbjornu/GitReleaseNotes that referenced this issue Mar 7, 2016
Added `.` to the command example since without it, GRN explodes as per GitTools#95.
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

8 participants