Skip to content

[ISSUE]: GitVersion.MsBuild: Adding the nuget package to a SDK style project results gitversion.exe MyProj -outputfile obj\gitversion.json exited with code 1. #4086

@evya-dev

Description

@evya-dev

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitVersion.MsBuild

GitVersion version

5.6.8-5.12.0

Operating system

Windows

What are you seeing?

When adding the nuget package for GitVersion.MsBuild into my project throws an error in the Error List Window:

Error MSB3073 The command ""\packages\gitversion.msbuild\5.6.8\tools\net48/gitversion.exe" "ProjectName" -output file -outputfile obj\gitversion.json" exited with code 1. \packages\gitversion.msbuild\5.6.8\tools\GitVersion.MsBuild.targets 9

I tried running the command through the CLI and I got the following when using version 5.6.8:
unsupported repository version 1. Only version up to 0 are supported.

I tried running the same command but with the latest version 5.12.0 and I got the following error:
unsupported extension name extensions.worktreeconfig

My repo is cloned from BitBucket cloud. I am using Visual Studio 2019. The project is a SDK style project with TFM of net451.

What is expected?

The gitversion.exe should support git config core.repositoryformatversion=1 and extensions.worktreeconfig=true.

Steps to Reproduce

Clone a .NET framework or .NET core project on a repo that has git config with core.repositoryformatversion=1 and extensions.worktreeconfig=true. Currently this is what my git repo has on BitBucket cloud.
Open the project in Visual Studio 2019 and then add the GitVersion.MsBuild nuget package (any version from 5.6.8 to 5.12.0).
Observe the error in the Error List window of the IDE.

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions