Description
Describe the bug
I have a simple .net core 3.1 project in VS2019 including GitVersionTask Version=5.3.7 that normally compiles in VS.
I have a GitLab job that compiles too if GitVersionTask is removed from packages
Expected Behavior
compilation by gitlab job
Actual Behavior
I got an error:
C:\Users\xxxx\.nuget\packages\gitversiontask\5.3.7\build\GitVersionTask.targets(46,9): error : GitVersionException: Cannot find commit 37263fb6bcfabee8cff19327eb128314dd5c7be3. Please ensure that the repository is an unshallow clone with
git fetch --unshallow. [C:\Gitlab-Runner\builds\3VbVuPNg\0\xxxx\blazor\BlazorApp1\BlazorApp1.csproj]
and cannot continue the compilation.
Possible Fix
- remove GitVersionTask from packages (!)
- may be something like this ? (search for "GitVersionTask")
Steps to Reproduce
difficult: it seems to depend from our GitLabRunner for windows application, the previous one was working fine (see Environment)
Context
- I checked the issues An unexpected error occurred: Could not find a 'develop' or 'master' branch, neither locally nor remotely. branches are -> pull request branches #912 , but my git has a master and the unfound commit is the last in the master branch
- I try to disable GitVersion ref Add option to disable the complete GitVersion.Task for building with no existing repositories #1723 adding
<DisableGitVersionTask>true</DisableGitVersionTask>
inside the
<PropertyGroup>
of BlazorApp1.csproj but the fatal error persists.
Environment
- .net core 3.1
- gitlab-runner 13.1.1 (working with previous gitlab-runner 11.2.0)
- Windows Server 2019 STD
- GitLab Community Edition 13.1.4
- my CI build contains:
dotnet publish BlazorApp1.csproj -c Pre-release