question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid argument in UseGitVersion VS Task

See original GitHub issue

Hi,

We’re having issues when using the UseGitVersion task on a dotnetcore 3.1 project. Here are the logs :

Starting: UseGitVersion
==============================================================================
Task         : GitVersion Task
Description  : Easy Semantic Versioning (http://semver.org) for projects using Git
Version      : 5.1.2
Author       : GitVersion Contributors
Help         : See the [documentation](http://gitversion.readthedocs.org/en/latest/) for help
==============================================================================

--------------------------
Installing GitVersion.Tool version 5.1
--------------------------
/opt/hostedtoolcache/dncs/3.1.100/x64/dotnet tool install GitVersion.Tool --tool-path /home/vsts/work/_temp --version 5.1.2
You can invoke the tool using the following command: dotnet-gitversion
Tool 'gitversion.tool' (version '5.1.2') was successfully installed.
Caching tool: GitVersion.Tool 5.1.2 x64
##[error]Error: EINVAL: invalid argument, readlink '/opt/hostedtoolcache/dncs/3.1.100/x64/dotnet'
Finishing: UseGitVersion

And here’s the yaml part of the task :


  - task: UseGitVersion@5
    inputs:
      versionSpec: '5.1'
      updateAssemblyInfo: true

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:23 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
neolution-ch2commented, Jan 27, 2020

Just tried that by using 5.1.3, but the issue persists

2020-01-27T10:25:00.6229190Z ##[section]Starting: UseGitVersion
2020-01-27T10:25:00.6232209Z ==============================================================================
2020-01-27T10:25:00.6232282Z Task         : GitVersion Task
2020-01-27T10:25:00.6232318Z Description  : Easy Semantic Versioning (http://semver.org) for projects using Git
2020-01-27T10:25:00.6232417Z Version      : 5.1.2
2020-01-27T10:25:00.6232456Z Author       : GitVersion Contributors
2020-01-27T10:25:00.6232493Z Help         : See the [documentation](http://gitversion.readthedocs.org/en/latest/) for help
2020-01-27T10:25:00.6232569Z ==============================================================================
2020-01-27T10:25:03.5865497Z 
2020-01-27T10:25:03.5866276Z --------------------------
2020-01-27T10:25:03.5866448Z Installing GitVersion.Tool version 5.x
2020-01-27T10:25:03.5866766Z --------------------------
2020-01-27T10:25:04.2829229Z [command]/opt/hostedtoolcache/dotnet/dotnet tool install GitVersion.Tool --tool-path /home/vsts/work/_temp --version 5.1.3
2020-01-27T10:25:09.9043891Z 
2020-01-27T10:25:09.9044799Z Welcome to .NET Core 3.1!
2020-01-27T10:25:09.9046153Z ---------------------
2020-01-27T10:25:09.9046441Z SDK Version: 3.1.101
2020-01-27T10:25:09.9046650Z 
2020-01-27T10:25:09.9046876Z Telemetry
2020-01-27T10:25:09.9047383Z ---------
2020-01-27T10:25:09.9048239Z The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
2020-01-27T10:25:09.9048443Z 
2020-01-27T10:25:09.9048933Z Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
2020-01-27T10:25:09.9049126Z 
2020-01-27T10:25:09.9049483Z ----------------
2020-01-27T10:25:09.9049950Z Explore documentation: https://aka.ms/dotnet-docs
2020-01-27T10:25:09.9050162Z Report issues and find source on GitHub: https://github.com/dotnet/core
2020-01-27T10:25:09.9050566Z Find out what's new: https://aka.ms/dotnet-whats-new
2020-01-27T10:25:09.9051069Z Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
2020-01-27T10:25:09.9051514Z Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
2020-01-27T10:25:09.9051929Z Write your first app: https://aka.ms/first-net-core-app
2020-01-27T10:25:09.9052429Z --------------------------------------------------------------------------------------
2020-01-27T10:25:09.9052855Z You can invoke the tool using the following command: dotnet-gitversion
2020-01-27T10:25:09.9053331Z Tool 'gitversion.tool' (version '5.1.3') was successfully installed.
2020-01-27T10:25:09.9100939Z Caching tool: GitVersion.Tool 5.1.3 x64
2020-01-27T10:25:11.1406677Z ##[error]Error: EINVAL: invalid argument, readlink '/opt/hostedtoolcache/dotnet/dotnet'
2020-01-27T10:25:11.3557532Z ##[section]Finishing: UseGitVersion

Is there another problem? Haven’t had an issue so far on our local Windows buildservers, but the error above occured on a Ubuntu-16.04 image.

0reactions
arturciccommented, Feb 18, 2020

ok great, closing the issue. Closed by #41

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid argument in UseGitVersion VS Task · Issue #40
Hi, We're having issues when using the UseGitVersion task on a dotnetcore 3.1 project. Here are the logs : Starting: UseGitVersion ...
Read more >
GitVersion on Azure DevOps yaml pipeline fails on Linux
Tested the same task and got the same issue. ##[error]Error: EINVAL: invalid argument, readlink '/opt/hostedtoolcache/dotnet/dotnet'.
Read more >
Azure DevOps
The custom build step requires a one-time setup to import the GitVersion task into your TFS or Azure DevOps Pipeline instance.
Read more >
GitTools/GitVersion - Gitter
Hi! When I use GitVersion on my dev machine I get a branch name excluding the remote but when I run the build...
Read more >
Nuget Package Versioning in Azure DevOps with GitVersion
If you blinked last year (or hiked the Appalachian trail) you may have ... task: NuGetCommand@2 inputs: command: custom arguments: install ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found