Skip to content

[Bug] DisableGitVersionTask ineffective #2640

@NeilMacMullen

Description

@NeilMacMullen

Describe the bug
The DisableGitVersionTask property was used on the old GitVersionTask package to allow continuous test runners such as Ncrunch to operate without access to the git repository. It appears that no longer works with the new GitVersion.MsBuild package. Instead, gitversion.exe is run and then fails (due to not being able to find '.git').

Expected Behavior

No gitversion tasks should be run if DisableGitVersionTask is set to true

Actual Behavior

Errors such as this occur (from NCrunch Trace Output)

NCrunch: This project was built on server '(local)'
C:\Users\neilm\.nuget\packages\gitversion.msbuild\5.6.7\tools\GitVersion.MsBuild.targets: The command ""C:\Users\neilm\.nuget\packages\gitversion.msbuild\5.6.7\tools\net48/gitversion.exe" "C:\Users\neilm\AppData\Local\NCrunch\20620\27\Textrude" -output file -outputfile obj\gitversion.json" exited with code 

This post describes the same issue (from another user).

Possible Fix

Presumably something in the twisty maze of conditional properties in GitVersion.MsBuild.props is going awry.

Steps to Reproduce

Context

Show stopper since unable to run tests

Your Environment

  • Version Used: 5.6.7 but it seems to have been broken at least as far back as 5.6.0
  • Operating System and version: Windows 10
  • Link to your project: Branch exhibiting issue
  • Link to your CI build (if appropriate): N/A - checkout and run locally with Ncrunch enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions