GitVersion 5+ not working on Visual Studio 2019 build

ben's Avatar

ben

14 Aug, 2019 12:49 AM

I'm not sure if this is really an AppVeyor thing but I wanted to report it anyway just in case it helps. Recently my VS2019 build images started failing and I realised today that it's related to the recent version of GitVersion that have been released since July 30th (at the time of writing this v5.0.0 and v5.0.1).

I know get the following error:

System.Configuration.ConfigurationErrorsException: Unrecognized configuration section dllmap. (C:\ProgramData\chocolatey\lib\GitVersion.Portable\tools\GitVersion.exe.Config line 6)

To fix this I simply updated my yaml file to ensure that v4.0.0 is always used:

choco install gitversion.portable --version 4.0.0

And this appears to have soled the issue.

  1. 1 Posted by darrell.tunnell on 25 Oct, 2019 02:46 PM

    darrell.tunnell's Avatar

    Hit the same problem. Raised issue here:
    https://github.com/GitTools/GitVersion/issues/1869

  2. 2 Posted by Jeremy Gray on 13 Jan, 2020 04:42 AM

    Jeremy Gray's Avatar

    Just to quickly follow up here: I've just commented on the issue linked by Darrell, as I ran into this today myself and was able to narrow it down to a particular release. I'll paste my comment content below. Hopefully this issue will eventually see some resolution, as I quite like GitVersion, and want to run the latest and greatest version thereof, but strongly prefer to keep it decoupled by using the portable version rather than the MSBuild tasks.

    (comment text from here onward)

    Upon encountering the same issue myself, I was able to narrow the failure to the following version: 4.0.1-beta.1+44.Branch.master.Sha.16c69e62d2a01696728411cb70cfa457551d8bd0

    As the version immediately before it does not experience the problem: 4.0.1-beta.1+43.Branch.master.Sha.fc86cb2b6df90b300a5f4a50b1bd113b606c7c99

    The changes in 4.0.1-beta.1+44, at least from the perspective of the source tree, seem innocuous. They appear unlikely to cause a problem unless an assembly binding redirect was deleted when it was in actuality required. Perhaps something downstream of the source tree? e.g. build and/or packaging for release?

  3. Support Staff 3 Posted by Feodor Fitsner on 13 Jan, 2020 07:48 PM

    Feodor Fitsner's Avatar

    Hi Jeremy,

    GitVersion 5.1.3 was in VS 2019 image update 4 days ago: https://www.appveyor.com/updates/2020/01/09/

    Did you have a chance to give it a try? Does it still have the issue on our environment?

  4. 4 Posted by Jeremy Gray on 13 Jan, 2020 09:39 PM

    Jeremy Gray's Avatar

    Hey there Feodor. As things turn out, if I remove the use of Chocolatey and simply use the version in the image then everything works. I imagine there's something up with the Chocolatey version and, if nothing else, GitVersion's appveyor.yml generation (as unless I'm mistaken I recall it being the thing that set up the choco install in the first place.)

  5. Support Staff 5 Posted by Feodor Fitsner on 13 Jan, 2020 09:48 PM

    Feodor Fitsner's Avatar

    OK, that's interesting. If you look at chocolateyInstall.ps1 for GitVersion https://chocolatey.org/packages/GitVersion.Portable/5.1.3#files you'll see there Generate-BinFile ... - my guess is that it's Chocolatey's shim being generated and this could be something related to that. On AppVeyor environment GitVersion is installed from NuGet package and GitVersion.exe is called directly.

  6. 6 Posted by ben on 19 Jan, 2020 10:26 PM

    ben's Avatar

    The updated VM worked for me and has solved the issue. Thanks for letting me know about the update.

  7. Support Staff 7 Posted by Feodor Fitsner on 19 Jan, 2020 11:38 PM

    Feodor Fitsner's Avatar

    Thanks for the update!

  8. Feodor Fitsner closed this discussion on 03 Apr, 2020 06:47 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

07 Jul, 2020 06:21 PM
07 Jul, 2020 03:15 PM
05 Jul, 2020 02:33 AM
03 Jul, 2020 07:29 PM
03 Jul, 2020 03:53 AM

 

02 Jul, 2020 09:09 PM
02 Jul, 2020 03:24 PM
01 Jul, 2020 01:12 PM
30 Jun, 2020 04:26 PM
25 Jun, 2020 05:54 PM
24 Jun, 2020 08:11 AM