Skip to content

GitVersion throws Error parsing Infinity value on Jenkins and TeamCity #1982

Closed
@ajaskiewiczpl

Description

@ajaskiewiczpl

I'm using GitVersion.Tool 5.1.1 (dotnet core) inside my PowerShell build script and it crashes when running in Jenkins multipipeline job. It throws error:

`

"C:\Program Files\dotnet\dotnet.exe" D:\Dev\NuGet\gitversion.tool\5.1.1\tools\netcoreapp3.0\any\GitVersion.dll
Error parsing Infinity value. Path '', line 1, position 1.
at Newtonsoft.Json.JsonTextReader.ParseNumberPositiveInfinity(ReadType readType, Boolean matched)
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonReader.ReadAndMoveToContent()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GetResult(IProcess process, GitVersionSettings toolSettings)
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(GitVersionSettings toolSettings)
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure1 configurator) at Nuke.Common.Tools.GitVersion.GitVersionAttribute.GetValue(MemberInfo member, Object instance) at Nuke.Common.Execution.InjectionUtility.InjectValuesInternal[T](T instance, IEnumerable1 tuples)
at Nuke.Common.Execution.InjectionUtility.InjectValues[T](T instance, Func2 filter) at Nuke.Common.Execution.BuildManager.Execute[T](Expression1[] defaultTargetExpressions)
`

It happens both on Jenkins and TeamCity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions