Skip to content

##[error]Error: Unable to locate executable file: 'dotnet-gitversion'. #1034

@carlh98

Description

@carlh98

Hi, on certain macOS MS-Hosted machines, when I run the following

steps:
  - task: gitversion/setup@0
    retryCountOnTaskFailure: 3
    inputs:
      versionSpec: '5.12.0'
    displayName: 'Install GitVersion'

  - task: gitversion/execute@0
    inputs:
      useConfigFile: true
      configFilePath: $(Build.SourcesDirectory)/.template.config/build/gitversion-config.yml
    displayName: 'Calculate Template Version'

I get the following as a result

Starting: Install GitVersion
==============================================================================
Task         : Setup GitVersion Task
Description  : Easy Semantic Versioning (http://semver.org/) for projects using Git
Version      : 0.10.2
Author       : GitTools Contributors
Help         : See the [documentation](https://gitversion.net/docs/) for help
==============================================================================
Agent: 'Azure Pipelines'

--------------------------
Acquiring GitVersion.Tool version spec: 5.12.0
--------------------------
Command: dotnet tool install GitVersion.Tool --tool-path /Users/runner/work/_temp --version 5.12.0
/Users/runner/hostedtoolcache/dotnet/dotnet tool install GitVersion.Tool --tool-path /Users/runner/work/_temp --version 5.12.0
Caching tool: GitVersion.Tool 5.12.0 x64
--------------------------
GitVersion.Tool version: 5.12.0 installed.
--------------------------
Prepending PATH environment variable with directory: /Users/runner/hostedtoolcache/GitVersion.Tool/5.12.0/x64
Finishing: Install GitVersion

Starting: Calculate Template Version
==============================================================================
Task         : Execute GitVersion Task
Description  : Easy Semantic Versioning (http://semver.org/) for projects using Git
Version      : 0.10.2
Author       : GitTools Contributors
Help         : See the [documentation](https://gitversion.net/docs/) for help
==============================================================================
Agent: 'Azure Pipelines'
Command: dotnet-gitversion /Users/runner/work/1/s /output json /output buildserver /config /Users/runner/work/1/s/.template.config/build/gitversion-config.yml
##[error]Error: Unable to locate executable file: 'dotnet-gitversion'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
Finishing: Calculate Template Version

Image information:
Agent machine name: 'Mac-1707230360839'
Current agent version: '3.232.3'
Operating System
macOS
12.7.3
21H1015
Runner Image
Image: macos-12
Version: 20240127.1
Included Software: https://github.com/actions/runner-images/blob/macOS-12/20240127.1/images/macos/macos-12-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20240127.1
Runner Image Provisioner
2.0.341.1+ea3907f30f87ddf37e44fa45b753abddb03811b4
Current image version: '20240127.1'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions