Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 馃悰 Using IHaveGitVersion component #77

Closed
candoumbe opened this issue Jul 18, 2023 · 1 comment
Closed

[BUG] 馃悰 Using IHaveGitVersion component #77

candoumbe opened this issue Jul 18, 2023 · 1 comment
Assignees
Labels
bug 馃悰 Something isn't working

Comments

@candoumbe
Copy link
Owner

Usage Information

Package version : 0.5.0-beta0071

Description

Using IHaveGitVersion without adding the required dotnet tool throws an exception stating that a required package is missing.

Checks if there could be a better way to advertise what is required when using IHaveGitVersion component.

Relevant Code / Invocations

class MyBuildPipeline : NukeBuild, IHaveGitVersion
{
     ....
}

Expected Behavior

The ideal solution would be an analyzer which automatically add missing references

Stacktrace / Exception

System.Exception: Missing package reference/download.
Run one of the following commands:
  - nuke :add-package GitVersion.Tool --version 5.12.0
  - nuke :add-package GitVersion.CommandLine --version 5.12.0
 ---> System.ArgumentException: Could not find package 'GitVersion.Tool' or 'GitVersion.CommandLine' using:
 - Project assets file '/home/candoumbe/Projects/Dox.io/modules/PrintingMachine/build/obj/project.assets.json'
 - NuGet packages config '/home/candoumbe/Projects/Dox.io/modules/PrintingMachine/build/IPPClient.Pipelines.csproj'
   at Nuke.Common.Assert.NotNull[T](T obj, String message, String argumentExpression) in /_/source/Nuke.Utilities/Assert.cs:line 73
   at Nuke.Common.Tooling.NuGetToolPathResolver.GetPackageDirectory(String[] packageIds, String version) in /_/source/Nuke.Tooling/NuGetToolPathResolver.cs:line 85
   --- End of inner exception stack trace ---
   at Nuke.Common.Assert.Fail(String message, Exception exception) in /_/source/Nuke.Utilities/Assert.cs:line 28
   at Nuke.Common.Tooling.NuGetToolPathResolver.GetPackageDirectory(String[] packageIds, String version) in /_/source/Nuke.Tooling/NuGetToolPathResolver.cs:line 145
   at Nuke.Common.Tooling.NuGetToolPathResolver.GetPackageExecutable(String packageId, String packageExecutable, String version, String framework) in /_/source/Nuke.Tooling/NuGetToolPathResolver.cs:line 29
   at Nuke.Common.Tools.GitVersion.GitVersionTasks.GetToolPath(String framework) in /_/source/Nuke.Common/Tools/GitVersion/GitVersionTasks.cs:line 28
   at Nuke.Common.Tools.GitVersion.GitVersionSettings.GetProcessToolPath() in /_/source/Nuke.Common/Tools/GitVersion/GitVersionTasks.cs:line 20
   at Nuke.Common.Tools.GitVersion.GitVersionSettings.get_ProcessToolPath() in /_/source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 176
   at Nuke.Common.Tooling.ProcessTasks.StartProcess(ToolSettings toolSettings) in /_/source/Nuke.Tooling/ProcessTasks.cs:line 55
   at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(GitVersionSettings toolSettings) in /_/source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 85
   at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure`1 configurator) in /_/source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 124
   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.Build/Execution/Extensibility/ValueInjectionAttributeBase.cs:line 26
Member 'GitVersion' is required to be not null
@candoumbe candoumbe added the bug 馃悰 Something isn't working label Jul 18, 2023
@candoumbe candoumbe self-assigned this Jul 18, 2023
@candoumbe candoumbe changed the title [BUG] 馃悰 Using IHaveGitVersion cpmponent [BUG] 馃悰 Using IHaveGitVersion component Jul 18, 2023
candoumbe added a commit that referenced this issue Jul 24, 2023
- Adds nuget package requirement for `IHaveGitVersion` component (#77)
- Adds nuget package requirement for `IReportCoverage` component
@candoumbe
Copy link
Owner Author

Closed with df1f7da

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 馃悰 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant