## 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
hey guys, is there anyway to tag release candidates at all with tags using GitVersion?
i have a continuous delivery workflow, and tag to release, but if i tag a release candidate (want to avoid release branches) then gitflow fails with:
PackageVersion string specified '0.3.2-rc(no branch)' is invalid.
to clarify also, it's only an issue when checked out to that tag
ugh, i found out, it's to do with the branch normalization; is there any way to disable it with GetVersionTask? i can pass -nonormalize and the tool suddenly works, but i can't figure out how to disable it via msbuild...
<PropertyGroup><GitVersion_NoNormalizeEnabled>true</GitVersion_NoNormalizeEnabled></PropertyGroup>
thanks rubber ducks!
lol
Patrick B
@PatrickBig
ALIRGHT
I have an issue. I figured out my problem where my versions were not being calculated properly. I downgraded the CLI tool to 5.3.7 and everything is working the way I expect now
danieljc
@izzap
GitVersion, GitFlow, Azure DevOps, hotfix and pull requests. How do I configure GitVersion to generate the correct version when build pull request of a hotfix? Hotfix build gets version 1.2.3-beta but pull request of that hotfix gets version 1.3.0-PullRequest, I expected it to get 1.2.3-PullRequest
Tim Long
@NameOfTheDragon

Hey guys, I'm getting an error when building a multi-targetted .NETStandard class library:

C:\Users\Tim.nuget\packages\gitversion.msbuild\5.6.3\tools\GitVersion.MsBuild.targets(110,9): Error MSB4044: The "GenerateGitVersionInformation" task was not given a value for the required parameter "Language".

Any advice on how to deal with this?

Eric Frazer
I just installed GitTools version 0.9.8.X, last updated Jan 5, into Azure DevOps, and am trying to set up gitversion/execute... not working as expected. docs are scant. I'm unclear of how to use this task. I have 'update assemblyinfo files' turned on, but it's unclear if it is supposed to update ALL assemblyinfo.cs files recursively under the main directory, or if I am supposed to point this task to just one directory. Also, it's unclear what to put into "update assembly file". Will that variable take several files or just one? What if I leave it blank? Also, what should go into "working directory path"? a relative directory to the root of the build, like ".\ControlPanel\XXX" ? Not sure.
Whatever the case, when I run it, Azure says, "##[error]Error: Directory not found at .\ControlPanel\ControlPanel. This folder does exact relative to the root.
leonids2005
@leonids2005
I have a question. Trying to use Gitversion in mainline mode and the question is - could I prevent getversion to increment a patch number when I create a new branch. So let's say my current master version is 1.0.1 so when I create a new branch from the master - the version in this new branch is 1.0.2. Technically this is the same version really - even the commit is the same.
zaaml
@zaaml

Hi everyone, I've just updated my solution to use GitVersion.MsBuild (5.6.4) package instead of GitVersionTask (5.5.1) and getting an error when building the solution from command line:

ERROR [01/25/21 18:29:57:89] An unexpected error occurred:
System.IO.IOException: The process cannot access the file '...\gitversion.json' because it is being used by another process. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at System.IO.File.WriteAllText(String path, String contents, Encoding encoding) at GitVersion.FileSystem.WriteAllText(String file, String fileContents, Encoding encoding) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\FileSystem.cs:line 47 at GitVersion.FileSystem.WriteAllText(String file, String fileContents) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\FileSystem.cs:line 42 at GitVersion.VersionConverters.OutputGenerator.OutputGenerator.Execute(VersionVariables variables, OutputContext context) in D:\a\GitVersion\GitVersion\src\GitVersionCore\VersionConverters\OutputGenerator\OutputGenerator.cs:line 39 at GitVersion.GitVersionOutputTool.OutputVariables(VersionVariables variables, Boolean updateBuildNumber) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitVersionOutputTool.cs:line 42 at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersionExe\GitVersionExecutor.cs:line 66

is it a known issue?

Stefano Cotterli
@faina09
GitVersionTask is deprecated. What should I use instead?? I use Visual Studio Professional 2019 ver 16.8.4 and trying GitVersion.MsBuild I have an issue similar @zaaml (The process cannot access the file '...\gitversion.json').
Daniele Pozzobon
@danielepo
hi everyone, i was wondering, is there a reason why when i set a branch for ContinuousDeployment the setting useBranchName for the tag will no loger work? when i set ContinuosDeployment i have to specify the tag myself and i couldn't find any explanation as to why in the docs
Simon Novak
@snovak7
Hello, I see GitVersionTask is deprecated as a package?? what is the replacement?
Gary Ewan Park
@gep13
@snovak7 if you look on the NuGet.org page: https://www.nuget.org/packages/GitVersionTask/ It is mentioned what is the replacement
The package that you want to be using is this one:
Stefano Cotterli
@faina09
A lot of problems using GitVersion.MsBuild as a replacement of the 'deprecated' (!) GitVersionTask.
In Microsoft Visual Studio Professional 2019 Version 16.8.5 reports 'impossible to write' and other errors, I tried some days ago and rolled back to GitVersionTask
Gary Ewan Park
@gep13
@faina09 have you reported these issues in the GitHub Repository, along with steps to reproduce the problem?
Stefano Cotterli
@faina09
I try to have a simple project to reproduce the problem. At the moment the issue is only on my project, and the output is: C:\Users\myuser.nuget\packages\gitversion.msbuild\5.6.6\tools\GitVersion.MsBuild.targets(9,9): error MSB3073: The command ""C:\Users\myuser.nuget\packages\gitversion.msbuild\5.6.6\tools\net48/gitversion.exe" "C:\nDEV\HayaiB\HayaiBTemplate" -output file -outputfile obj\gitversion.json" exited with code 1.
Stefano Cotterli
@faina09
ok, it seems that the error was due to the existence of TWO GitVersion.yml files in the main project directory and in a sub. Renaming one of the two the issue is gone.
Gary Ewan Park
@gep13
Glad to hear that you got this figured out
Andrej Zachar
@azachar
Hi there, is there any quick solution to support python versioning convention, especially pep 440? Thank you!
Andrej Zachar
@azachar
I found it here -GitTools/GitVersion#2065
quasarea
@quasarea
Hi, I wonder - is there a way to automagically increment with +semver: minor when pr from feature branch gets merged?
I guess, perhaps pipeline when building feature pr would have to update commit on it to include +semver: minor
greengumby
@greengumby
Is there a way I can customise the version string generated on a feature branch. Essentially I run multiple feature branches in parallel and the "guessing" of the version is causing confusion for developers and testers. So instead of 1.0.1-foo.1+1 it becomes foo.1+1 .
Gaute Løken
@gautelo
Is there a way to prevent GitVersion from using remote branches? I want to go back in time and run GitVersion with a newer version and changed config, but I'm finding that having my repo connected to a remote is messing with my results. I can remove the remote, but that makes it cumbersome to navigate back and forth in the history..
samirem
@samirem
Hi! I have a problem where GitVersion.CommandLine is bumping my major version. Latest tags are 1.2.8 and GitVersion automatically sets next version to 2.0.0 instead of 1.2.9. Any ideas how to prevent this?
samirem
@samirem
I solved this by ignoring a commit that has +semver:major way back in the history.
mcoolidge
@mcoolidge
Is GitVersionTask actually depreciated? I only see that reference in the nuget page, but all the docs still reference it. Replacing with GitVersion.MsBuild doesn't seem to work out of the box.
srollinet
@srollinet
Hi, everyone! Is it possible to configure GitVersion to allow a number in the PreReleaseLabel? I have tags like v1.0.0-SAT1 and the generated version number is 1.0.0-SAT.1 which become a 1.0.0-SAT.2 after a commit. So I have version collisions when I create a second 'SAT' tag.
What I want to achieve is something like that
tag v1.0.0-SAT1 -> 1.0.0-SAT1
comit -> 1.0.0-SAT1.1
tag v1.0.0-SAT2 -> 1.0.0-SAT2
Andrej Zachar
@azachar
Hello Everyone, how come that develop branch produced version 0.2.0.xxx and master branch of the same commit produces 0.1.12 (the common tag is 0.1.11)
I am not using this GitVersion.yml:
branches:
master: {}
release:
tag: 'rc'
feature:
tag: 'dev'
develop:
tag: 'a'
hotfix:
tag: 'post'
Is it because the master is {}?
Gaute Løken
@gautelo
Does gitversion apply some default where your own GitVersion.yml is applied on top of those defaults? I'm getting a "Multiple branch configurations match the current branch branchName of {0}" error because it's confused between my 'task' config and a 'main' config. But I don't have any 'main'. (We're still using 'master'.) I suspect this is because of some defaults including a 'main'. Where can I find these defaults? And even better, how can I disable 'main'?
Gaute Løken
@gautelo
Seems my first question is answered by gitversion /showConfig. My second question seems to then be that config section for 'master' is simply renamed to 'main'. Ok then.
And my mistake was that the regex for master was 'master' instead of '^master\$' which meant a task branch which contained the word master messed me up. Arright.. Thanks for letting me rubber duck this one out! ;)
Neil Stevens
@StickNitro
Hallo, can anyone help with a configuration question please, I have a gitversion.yml using mainline mode, we develop in branches taken from master and merge back into master through PRs (we don't use gitflow), I have a problem where if I create a branch I can see the version getting incremented in the branch but when I merge the branch back to master it does not carry through (e.g. master is at 0.1.0, my branch feature/one is at 0.2.0 so when I merge I would expect master to be 0.2.0 but it ends up being 0.1.1)
this is my config
mode: Mainline
branches:
master:
is-mainline: true
feature:
regex: feature?[/-]
increment: Minor
ignore:
sha: []
merge-message-formats: {}
Justin Grote
@JustinGrote
@StickNitro Hey, this is because the increment statement on feature is the default increment, e.g. if you don't specify a commit message. When you merge to master that's no longer applied, and since I'm guessing your commit names aren't following the conventions to tell gitversion to bump the version, you end up with a patch increment rather than a minor one. Try adding to at least one of your commits in your feature branch +semver:minor, then when you merge you should get 0.2.0.
Justin Grote
@JustinGrote
Q: In Github Actions my github version for pull requests doesn't seem to be matching. It keeps coming back as pull/1/merge rather than PullRequest.x. If I make a local pull/1/merge branch though it works fine. Is there something I'm missing about Github Actions?
Justin Grote
@JustinGrote
hmm the GitTools github actions works as expected, wondering what's messed up in my config
I'm an idiot, I had /nonormalize set. Hope this helps someone else.
Justin Grote
@JustinGrote

Is there any way in GitVersion to get a list of commits it evaluated since the last tag and find out how it classified them? (Major/Minor/Patch)?

I'm working on a changelog generator and I'd like it to use GitVersion's evaluation