If we are facing this error "Disable Telemetry ##[error]Unable to locate executable file: dotnet" under this below Microsoft Extension , It is unable to handle the .net 9 version calculation. This issue is not handled after the gitversion.setup@2.0.0 updated .https://marketplace.visualstudio.com/items?itemName=gittools.gitversion
-
gitversion.setup@3.0.0
Solution:
To resolve this error we need to use dot task on additionally, that will handle the dot net version on the agent pool (machine)
- task: UseDotNet@2
inputs:
version: 9.x #change the version according to your application
- task: gitversion/setup@3.0.0
displayName: Setup GitVersion
inputs:
versionSpec: '5.x'
includePrerelease: false
preferLatestVersion: true