Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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

Open
2 tasks done
evya-dev opened this issue Jul 5, 2024 · 4 comments

Comments

@evya-dev
Copy link

evya-dev commented Jul 5, 2024

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

@evya-dev
Copy link
Author

evya-dev commented Jul 8, 2024

If I do a gitversion init I get the following (where SomeProject has a .git folder):

INFO [07/08/24 18:18:11:13] Working directory: C:\SomeProject\packages\gitversion.msbuild\5.12.0\tools\net48
unsupported extension name extensions.worktreeconfig
INFO [07/08/24 18:18:11:18] Done writing

@evya-dev evya-dev changed the title GitVersion.MsBuild: Adding the nuget package to a SDK style project results gitversion.exe MyProj -outputfile obj\gitversion.json exited with code 1. [ISSUE]:GitVersion.MsBuild: Adding the nuget package to a SDK style project results gitversion.exe MyProj -outputfile obj\gitversion.json exited with code 1. Jul 8, 2024
@evya-dev evya-dev changed the title [ISSUE]:GitVersion.MsBuild: Adding the nuget package to a SDK style project results gitversion.exe MyProj -outputfile obj\gitversion.json exited with code 1. [ISSUE]: GitVersion.MsBuild: Adding the nuget package to a SDK style project results gitversion.exe MyProj -outputfile obj\gitversion.json exited with code 1. Jul 8, 2024
@evya-dev
Copy link
Author

evya-dev commented Jul 9, 2024

This is an upstream issue in libgit2sharp library (which at the time of this comment is at version 0.3.0). libgit2sharp 0.3.0 already has support for core.repositoryformatversion=1 but does not support extensions.worktreeconfig=true.

libgit2 has added this feature (core.repositoryformatversion=1 and extensions.worktreeconfig=true):
libgit2/libgit2#6044

Next steps is to bring this downstream to libgit2Sharp and then into GitVersion.LibGit2Sharp project.

@evya-dev
Copy link
Author

evya-dev commented Jul 9, 2024

The issue in libgit2Sharp has been created here:
libgit2/libgit2sharp#2109

Copy link

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants