You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to the problem reported in issue #1008 I get the same error with Could not inject value for "Build.GitVersion" and in my case it's an Azure DevOps pipeline.
The repo for this solution/build follows the same approaches/layout as we use in several other repos and we're using almost identical build.cs contents and our build pipeline & gitversion yaml files are almost the same as well.
Being that this fails in injecting the tooling, I'm not seeing anything really helpful in the logged contents/stack trace.
Myself & another engineer have compared this repo to the others that work just fine and we're not seeing anything that would account for why this repo's build fails - and it only fails when ran in the DevOps pipeline.
Any tips/tricks/pointers on how to chase this further would be appreciated.
at Nuke.Common.Tooling.ProcessExtensions.AssertZeroExitCode(IProcess process) in //source/Nuke.Common/Tooling/ProcessExtensions.cs:line 39
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(GitVersionSettings toolSettings) in //source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 83
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure`1 configurator) in //source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 121
at Nuke.Common.Tools.GitVersion.GitVersionAttribute.GetValue(MemberInfo member, Object instance) in //source/Nuke.Common/Tools/GitVersion/GitVersionAttribute.cs:line 47
at Nuke.Common.ValueInjection.ValueInjectionAttributeBase.TryGetValue(MemberInfo member, Object instance) in /_/source/Nuke.Common/ValueInjection/ValueInjectionAttributeBase.cs:line 25
Regression?
No, other repos are using the same versions of Nuke & GitVersion and work fine.
Known Workarounds
No workaround identified; Very hard to triage why the injection fails / what GitVersion is struggling with that only applies when running in the pipeline.
The text was updated successfully, but these errors were encountered:
Usage Information
Nuke 6.2.1, .NET 6, DevOps Pipeline using "windows_latest", leveraging GitVersion.CommandLine package v5.10.3
Description
Similar to the problem reported in issue #1008 I get the same error with Could not inject value for "Build.GitVersion" and in my case it's an Azure DevOps pipeline.
The repo for this solution/build follows the same approaches/layout as we use in several other repos and we're using almost identical build.cs contents and our build pipeline & gitversion yaml files are almost the same as well.
Being that this fails in injecting the tooling, I'm not seeing anything really helpful in the logged contents/stack trace.
Myself & another engineer have compared this repo to the others that work just fine and we're not seeing anything that would account for why this repo's build fails - and it only fails when ran in the DevOps pipeline.
Any tips/tricks/pointers on how to chase this further would be appreciated.
Reproduction Steps
Use the GitVersion.CommandLine package
Include the GitVersion tooling in the Build.cs file:
Consume the property, causing it to lazy-load/initialize which then fails due to a null reference exception. I.e.
Expected Behavior
GitVersion tooling should be injected and available for consuming.
Actual Behavior
NullReferenceException is throw since the GitVersion property was not injected correctly.
20:03:28 [WRN] Could not inject value for Build.GitVersion
Nuke.Common.Tooling.ProcessException: Process 'gitversion.exe' exited with code 1.
at Nuke.Common.Tooling.ProcessExtensions.AssertZeroExitCode(IProcess process) in //source/Nuke.Common/Tooling/ProcessExtensions.cs:line 39
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(GitVersionSettings toolSettings) in //source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 83
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure`1 configurator) in //source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 121
at Nuke.Common.Tools.GitVersion.GitVersionAttribute.GetValue(MemberInfo member, Object instance) in //source/Nuke.Common/Tools/GitVersion/GitVersionAttribute.cs:line 47
at Nuke.Common.ValueInjection.ValueInjectionAttributeBase.TryGetValue(MemberInfo member, Object instance) in /_/source/Nuke.Common/ValueInjection/ValueInjectionAttributeBase.cs:line 25
Regression?
No, other repos are using the same versions of Nuke & GitVersion and work fine.
Known Workarounds
No workaround identified; Very hard to triage why the injection fails / what GitVersion is struggling with that only applies when running in the pipeline.
The text was updated successfully, but these errors were encountered: