by

## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 02:47
stale[bot] closed #1870
• Jun 04 20:10
• Jun 04 20:09
Inok commented #2300
• Jun 04 20:05
Inok synchronize #2300
• Jun 04 19:54
Inok synchronize #2300
• Jun 04 15:44
borgez commented #2307
• Jun 04 12:45
asbjornu commented #2309
• Jun 04 12:41
asbjornu commented #2287
• Jun 04 12:34
kinguru commented #999
• Jun 04 12:34
kinguru commented #999
• Jun 04 11:52
stale[bot] closed #1836
• Jun 04 11:22
asbjornu commented #2307
• Jun 04 11:04
asbjornu commented #2285
• Jun 04 10:25
pietergheysens commented #2278
• Jun 04 10:08
hana26 opened #2309
• Jun 04 06:02
borgez commented #2307
• Jun 04 06:02
borgez commented #2307
• Jun 03 23:59
cuichenli commented #2302
• Jun 03 20:34
stale[bot] labeled #2131
• Jun 03 20:34
stale[bot] commented #2131
Artur
@arturcic
why not use the azure task?
what is the issue
Søren Knudsen
@Soren-Knudsen
@arturcic: Can I try share my pull pipeline with you?
Artur
@arturcic
sure
Matt Benson
@mbenson
hello all, I am noticing that CommitsSinceVersionSource seems inflated. e.g. I can git log B..A from my last release tag to my current (feature) branch and count 12 commits, but the calculated number is 117. Can anyone explain this oddity to me?
jim-craane
@jim-craane

Heey all,

I can use some help with the GitVersion configuration. I can't figure it out how to setup correctly for my scenario.

I have a simple git repo with a release and a develop branch on the same level for a nuget package. Every commit a new version (pre-release or release) of the nuget package is created. Every merge from develop to release, the alpha version tag should be removed. After the merge, the develop branch should go further with alpha versions with a new patch version (and not from the old as shown in the screenshot)

'0.3.5-alpha0025' should be '0.3.6-alpha0025'

Here is my GitVersion.yaml:

Can someone help me?

Roman Rozinov
@rroman81
Hey everyone. I am looking at deciding the proper Azure DevOps extension usage. GitTools/GitVersion is stated to be deprecated in favor GitTools/UseGitVersion. However, in testing yaml build via UseGitVersion on .Net Core project, i am not seeing a way to update version properties similar to AssemblyInfo updates on .Net Full Framework. The docs also appear to be white stale as well. Is there definitive guidance which extension we should gravitate towards?
Artur
@arturcic
@rroman81 the extension that will be supported and new changes/fixes will be done is https://github.com/GitTools/actions/tree/master/docs/examples/azure/gitversion
Roman Rozinov
@rroman81
@arturcic Just to be clear, that means the extension we should be planning is https://marketplace.visualstudio.com/items?itemName=GitVersion.gitversion-preview?
IMO, it's a bit disorienting right now to make a decision. I am also unsure how to actually use it effectively with .net core project as updating assembly info is not an option and need to update the msbuild version property during the build task
Roman Rozinov
@rroman81
@arturcic I'll do some testing with my team next week.
Thanks
Artur
@arturcic
sure
Artur
@arturcic
a new version 5.3.0 of GitVerson was released
Sean Fausett
@gitfool
@arturcic if I understand correctly, the changes in GitTools/GitVersion#2221 means GitVersionTask will now robustly load its dependencies?
I moved away from the MSBuild tasks a while ago as it was plagued with loader context issues but would love to be able to move back to it!
Sean Fausett
@gitfool
More questions... despite what the docs say, https://gitversion.net/docs/usage/msbuild-task, I presume the MSBuild task works with dotnet build (dotnet core)?
... and is it possible to get the MSBuild task to write the new file output too (for tooling outside MSBuild to read)?
... and re https://github.com/GitTools/GitVersion/issues/2204#issuecomment-615881883, looks like you just missed the release of Ubuntu 20.04 (hint hint)
Sean Fausett
@gitfool
(... although Ubuntu 20.04 needs the next dotnet sdk which hasn't landed yet)
Lyubomyr Vyhovskyy
@luber
Hi guys. Does anyone know how to increment PreReleaseNumber?
I have release branch release/1.5.7, so GitVersion correctly determined semversion as 1.5.7-rc.1
Then I labeled last commit in this branch with v1.5.7-RC1 label and made few more commits. I expect to PreReleaseNumber will be increased so SemVersion would be v1.5.7-RC2, but it still v1.5.7-RC1
Roman Rozinov
@rroman81
@luber you need to make sure that the branch is in continuous deployment mode. The new default is that only develop is in that mode, other branches default to "continuous delivery" (requires a tag to increment).
Roman Rozinov
@rroman81
I have attempting to use bump message "+semver: feature" to increase the minor version during a PR merge, but it does not seem to take effect. Does it require to be in the body of the message itself or the lengthier description works as well?
Sven
@svengeance
@asbjornu Hey quick question about the upcoming 6.0.0 - is there any changes upcoming for arg parsing architecture?
Ranvir Singh
@ranvirsingh
Could not execute 'git log' due to the following error: System.IO.FileNotFoundException: The executable file 'git' could not be found. File name: 'git'
I am trying to run though teamcity VCS checkout "Always checkout file on Agent"
Ben Dean
@b-dean

Is there a way to make gitversion ignore commit messages and only use tags for versions?

I have a repo that uses gitflow but we have these non-semver "marketing" version numbers that are YYYY.N (year and number of releases that year). So we had some big effort on some release that had the release branch named something like release/2020.5-giant-project so there were merge messages with that into master and back into develop etc. The actual version is 2.0.0 and there's an annotated tag on master

but gitversion seems to ignore that tag and insists that the new version for develop should be some 2020.6.0 stuff, but it shouldn't, it should probably be 2.1.0

I'd like it to just use the git tags only not commits or merges for determining the base version
Ben Dean
@b-dean

I can put sha in the ignore list, but the problem is that some of those with the commit messages are also the ones that are tagged

$git log 2.0.0 commit a3079c986ec4df96eb50c2dcee5a575409e98084 Merge: 3bc4e9a 3ce74dd Author: Foo Bar <foo@bar.baz> Date: Thu May 14 23:10:59 2020 -0400 Merge branch 'release/2020.5-giant-project' so if I ignore that sha to avoid that merge commit message, it also ignores the tag vaishnav-n @vaishnav-n Hi, i am using gitversion 5.3.3 in cake. We get the build version details. Version goes till here [Version] INFO [05/20/20 9:24:59:42] Found 8 files [05:24:59][Version] INFO [05/20/20 9:24:59:61] Done writing but then version throws an error Checked the full log, no error messages as well vaishnav-n @vaishnav-n got an error message fiinally [Version] Exception isCake.Core.CakeException: GitVersion: Process returned an error (exit code 1). [08:11:36][Version] at Cake.Core.Tooling.Tool1.ProcessExitCode(Int32 exitCode) [08:11:36][Version] at Cake.Core.Tooling.Tool1.Run(TSettings settings, ProcessArgumentBuilder arguments, ProcessSettings processSettings, Action1 postAction) [08:11:36][Version] at Cake.Common.Tools.GitVersion.GitVersionRunner.Run(GitVersionSettings settings) [08:11:36][Version] at VersionAliases.Version(ICakeContext context) [08:11:36][Version] at Submission#0.Version() in :line 2763 [08:11:36][Version] at Submission#0.<<Initialize>>b0_3() in C:\BuildAgent\work\b6bc28d284e694e\build.cake:line 80 [08:11:36][Version] at Cake.Core.CakeTaskBuilderExtensions.<>c DisplayClass32_0.<Does>b0(ICakeContext x) [08:11:36][Version] at Cake.Core.CakeTask.<Execute>d 43.MoveNext() [08:11:36][Version] --- End of stack trace from previous location where exception was thrown --- [08:11:36][Version] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [08:11:36][Version] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [08:11:36][Version] at Cake.Core.DefaultExecutionStrategy.<ExecuteAsync>d4.MoveNext() [08:11:36][Version] --- End of stack trace from previous location where exception was thrown --- [08:11:36][Version] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [08:11:36][Version] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [08:11:36][Version] at Cake.Core.CakeEngine.<ExecuteTaskAsync>d 31.MoveNext() Chris Stylianou @chris5287 Hi, I've got a question around using GitVersion and NuGet packaging via dotnet pack. When GitVersion determines BuildMetaData should have a value, this in turn affects the FullSemVerto include it. Eg: Imaging current version is v1.2.4 and we are on a release branch with no tag yet, if GitVersion calculates BuildMetaData=4when I dotnet pack this will set FullSemVer=1.2.4-beta1+4. This becomes an issue for NuGet packages, as the .nuspec file's <version> property will use the FullSemVer (ie: 1.2.4-beta1+4) but the filename of the nupkg will be UsefulLib.1.2.4-beta1.nupkg as NuGet with normalise the filename and drop the metadata (https://github.com/NuGet/Home/wiki/SemVer-2.0.0-support#pack). However now if I do another follow-on build of the same commit thenBuildMetaData=5, FullSemVer=1.2.4-beta1+5 and .nuspec file's <version> property will use the FullSemVer (ie: 1.2.4-beta1+5) . BUT the nupkg filename will conflict with the previous UsefulLib.1.2.4-beta1.nupkg Has anyone dealt with this issue? Chris Stylianou @chris5287 FYI by setting “mode: ContinuousDeployment” this seems to generate Se mVer2 versions that work with NuGet packages. tomasz_augustyniak @tony6636 hi everyone, I'm trying to use GitVersion with Nuke Build within a DevOps Pipeline. Do I really need to install the UseGitVersion extension from Marketplace to be able to inject the variables in the code as [GitVersion] readonly GitVersion GitVersion; ? For now I'm getting the following error: > C:\Users\VssAdministrator\.nuget\packages\gitversion.commandline\5.3.4\tools\gitversion.exe ##[error]Process 'gitversion.exe' exited with code 1. Mattias Karlsson @devlead Does it work locally? Using same version of GitVersion? How are you calling GitVersion? With which args and in which folder as current directory? Inject variables in the code are you parsing the json or is this a Nuke issue? vaishnav-n @vaishnav-n Hi, when building a package , i am unable to remove the -ci tag from master builds. using gitversion 5.0.1 there is an issue related to this GitTools/GitVersion#999 but its been marked as stale Riksking @riksking Hi. I noticed one trouble in version 5.3.4. I have some c# projects on .net Core and .net Standard in one solution. And I have “Directory.Build.props” in core directory of solution with content <Project> <PropertyGroup> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> <UpdateAssemblyInfo>true</UpdateAssemblyInfo> <GenerateDocumentationFile>true</GenerateDocumentationFile> <NoWarn>$(NoWarn);1591</NoWarn> </PropertyGroup> </Project>

But when I build this project, I get this message
Target "UpdateAssemblyInfo" skipped, due to false condition; ($(UpdateAssemblyInfo) == 'true') was evaluated as (false == 'true'). And this Property reassignment:$(UpdateAssemblyInfo)="false" (previous value: "true") at \.nuget\packages\gitversiontask\5.3.4\build\GitVersionTask.props (22,9)
and the version is "0.0.0.0"

In version 5.0.1 it works fine and write current version of file.

Also, if I insert “<UpdateAssemblyInfo>true</UpdateAssemblyInfo>” into the project itself, version calculation and writing is successful.

vaishnav-n
@vaishnav-n
need help in moving a nuget package from prerelease to stable. building it using teamcity. we upload the package to a teamcity feed , feed only works with a prerelease version
Rodney Littles II
@RLittlesII
I have used GitVersion in the past for Xamarin Mobile. I have not tried it with the MSBuild task. I have a few questions around the support. The documentation states it will look for the AssemblyInfo.cs in the Properties directory. The command-line version does a recursive look. My AssemblyInfo.cs is currently at the root of the netstandard project. How can I verify that the MSBuild GitVersionTask is working correctly?
Simon Novak
@snovak7
I need some guidance with GitVersionTask with GitHub Actions, checkout seems to partially write some metadata (assuming) and I get error message from GitVersionTask stating: Please ensure that the repository is an unshallow clone with git fetch --unshallow.
Simon Novak
@snovak7
Ah found it :)
Rodney Littles II
@RLittlesII
Same. seems the GitVersionTask works fine on the netstandard project. Not just have to figure out to funnel that into the info.plist.
Sean Fausett
@gitfool
@snovak7 for GitHub Actions with actions/checkout@v2 you can now use fetch-depth: 0` to fetch all history needed by GitVersion