## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Jun 15 2020 13:06
arturcic unlabeled #2095
• Jun 15 2020 13:05
arturcic opened #2328
• Jun 15 2020 08:09
github-actions[bot] commented #2122
• Jun 15 2020 08:09
github-actions[bot] commented #2300
• Jun 15 2020 08:09
github-actions[bot] commented #2306
• Jun 15 2020 08:09
github-actions[bot] commented #2310
• Jun 15 2020 08:09
github-actions[bot] commented #2311
• Jun 15 2020 08:09
github-actions[bot] commented #2320
• Jun 15 2020 08:09
github-actions[bot] commented #2327
• Jun 15 2020 07:49
arturcic milestoned #2095
• Jun 15 2020 07:49
arturcic demilestoned #2095
• Jun 15 2020 07:46

arturcic on 5.3.6

• Jun 15 2020 07:27
arturcic demilestoned #2241
• Jun 15 2020 07:27
arturcic unassigned #2241
• Jun 15 2020 07:27
arturcic demilestoned #2074
• Jun 15 2020 07:26
arturcic milestoned #2327
• Jun 15 2020 07:25
arturcic demilestoned #2318
• Jun 15 2020 07:25
arturcic milestoned #2122
• Jun 15 2020 07:25
arturcic labeled #2122
• Jun 15 2020 07:23
arturcic demilestoned #2313
Simon Novak
@snovak7
What if you add explicit reference to 12 in csproj?
Bastian Schmidt
@batzen
I added no reference to newtonsoft as my lib does not need it and gitversiontask is supposed to be a build task or?
Simon Novak
@snovak7
Yes, but you could add build type reference
CI environments are isolated so you don’t packages preinstalled, like on local computer
If you have other projects which use newtonsoft.json
Have*
Bastian Schmidt
@batzen
Tried that just now. Didn't help...
Simon Novak
@snovak7
What if you take older version?
Bastian Schmidt
@batzen
That won't help either as i just deleted all cached versions of newtonsoft.json on my local machine and gitversiontask still works...
Simon Novak
@snovak7
Bastian Schmidt
@batzen
it's the same on appveyor and my machine
both invoked msbuild versions are Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Bastian Schmidt
@batzen
Got it to work by setting WriteVersionInfoToBuildLog to false
That setting is false by default on a local machine
Even though i couldn't reproduce the issue locally by setting it to true...
Simon Novak
@snovak7
Cool
Hi There, has anyone managed to install GitVersion command line on bitbucket build pipelines. They are Ubuntu and we can only use apt-get
Mattias Karlsson

Easiest probably to use .NET Core global tool

dotnet tool install --global GitVersion.Tool --version 5.1.3

https://www.nuget.org/packages/GitVersion.Tool

@devlead Thanks will give it a try
Dominik Psenner
@dpsenner

Hiho. I just adopted gitversiontask into a project where I also use github actions to build the project. Running the build on github actions however fails and as far as I grasp, gitversiontask deletes files in the .git/ directory which in turn causes the git repository to become corrupt.

https://github.com/dpsenner/event-sorcery/runs/393843142

Thoughts? Ideas? Am I doing something wrong?

The apparent culprit is:
/home/runner/.nuget/packages/gitversiontask/5.1.3/build/GitVersionTask.targets(10,9): warning : 2020-01-16 19:19:16              WARN [01/16/20 19:19:16:29] Unable to read cache file /home/runner/work/event-sorcery/event-sorcery/.git/gitversion_cache/61BA4200E58C0052BC7002D1FE8C8D7E6C5D701C.yml, deleting it.
Dominik Psenner
@dpsenner
Pushing another commit and building that apparently worked. The only change was updated dependencies. Flaky code?
Rebuilding the same commit failed. Flaky.
Dominik Psenner
@dpsenner
Appears I am able to reliably work around this by invoking dotnet publish -maxcpucount:1 .. parallelizing the build breaks GitVersionTask.
Dennis Doomen
What if I want to include the metadata number in the number generated for release- branches and take into account the tag. Is this possible?
Dennis Doomen
Because I think SemVer 2.0 supports something like 1.2.0-rc.2+34
This message was deleted
Robert Stocks
@stocksr
trying to update my azure devops - which of the 4 packages at https://marketplace.visualstudio.com/publishers/gittools is the current one?
Artur
@arturcic
@stocksr the UseGitversion is the current one, till we get the gittools
Robert Stocks
@stocksr
thanks that really helped
Martijn Hoekstra
@martijnhoekstra
How does GitVersion work out when a change is semantically breaking and should increase either major or minor version?
Martijn Hoekstra
@martijnhoekstra
wait, it seems it doesn't
Jesper Melin

Hello there. I'm looking at the examples for GitFlow and at the same time reading the description for Git Branching Strategies for GitFlow. What I cant wrap around my head is the example for Minor Release Branches when combined with the description.

When the branch for release/1.3.0 is created, I figure that the version on branch develop is bumped to 1.4.0 (minor+1) by looking at the version given in the release branch name. A commit is done on the develop branch yielding 1.4.0-alpha.1 (1 = number of commits ahead of release/1.3.0), so far so good. Now to my confusion... Once the release is completed and release/1.3.0 is merged with master and develop I do not understand how the version for develop is determined as 1.4.0-alpha.4? How can develop be 4 commits in front of master at this point since all commits done in release/1.4.0 have been merged both to develop and master?

Brian Garvey
@stonesbg
I need some help. I have setup GitVersion within CakeBuild and have a GitVersion.yml all defined. GitVersion is incrementing the correct number I just can't figure out how it gets pushed back to the repository. Currently it is using the git tag as the baseline so was thinking it was incrementing that but doesn't appear to be the case. The only thing i see is a gitversion.properties. Does this need to be check in in order to get auto increment between builds?
Martijn Hoekstra
@martijnhoekstra
I checked out a tag and try to build a project, I get a warning "It looks like the branch being examined is a detached Head pointing to commit '9dda6ee'. Without a proper branch name GitVersion cannot determine the build version." followed by an error " C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateAssemblyInfo.targets(160,5): error MSB4044: The "GetAssemblyVersion" task was not given a value for the required parameter "NuGetVersion". "
I have the impression that's related to the GitVersion plugin
does it ring a bell for anyone?
Martijn Hoekstra
@martijnhoekstra
also, the repo has multiple projects, that I want to version independently of each other. How do I configure that?
Ghost
@ghost~59aef239d73408ce4f7470ac
Guys we are getting this error all of a sudden on Appveyor: ibGit2Sharp.LibGit2SharpException: UsernamePasswordCredentials contains a null Username or Password. We did not change anything. We're using the GITVERSION_REMOTE_USERNAME/PASS env vars.
Any hints?
Aymen Bouchekoua
@NightFox7
Hello Guys. I want to use the overrideconfig argument to set the "mode" option but I got this error Could not parse /overrideconfig option: mode. Currently supported only 'tag-prefix' option Is there another way to do this (other than the GitVersion.yml file of course) ?
Jan Karger ツ ☀
@punker76

Hi, I have a question about getting the major and minor version number from branch names.

Is it possible to parse a branch name for digits? (major.minor)

with such a branch name:

releases/product/release-1-2-2020-branch

So that I get the major.manor = 1.2

Geert van Horrik
@GeertvanHorrik
@punker76 why don't you provide a tag or GitVersionConfig.yaml?

you can either put this in the root (named GitVersionConfig.yaml):

mode: ContinuousDeployment
assembly-versioning-scheme: MajorMinorPatch
next-version: 1.2.0

OR

tag the branch with 1.2.0

(mostly it's a release branch if you follow GitFlow, so release/1.2.0)
Jan Karger ツ ☀
@punker76
@GeertvanHorrik thx for the tag tipp 🙈 I will try this
Pieter Viljoen
@ptr727
Hi, reasonably new to GitVersion. Using it for a dotnet nuget project from azure devops. Using a master and develop branch. The GitVersion alpha automatically computed version is greater than the master release version, this confuses usage on nuget. How can I get the master version to always be greater than develop alpha of same branch? https://github.com/ptr727/Utilities