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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuke.DocFX Not Compatible With Nuke.Common >= 0.22.0 #323

Closed
Werebunny opened this issue Oct 20, 2019 · 1 comment
Closed

Nuke.DocFX Not Compatible With Nuke.Common >= 0.22.0 #323

Werebunny opened this issue Oct 20, 2019 · 1 comment

Comments

@Werebunny
Copy link

Expected Behavior

DocFXTasks methods work with latest versions.

Current Behavior

Method not found: 'System.String Nuke.Common.Tooling.ToolPathResolver.GetPackageExecutable(System.String, System.String, System.String)'.
   at Nuke.DocFX.DocFXTasks.get_DocFXPath()
   at Nuke.Common.Tooling.ProcessTasks.StartProcess(ToolSettings toolSettings)
   at Nuke.DocFX.DocFXTasks.DocFXBuild(DocFXBuildSettings toolSettings)
   at Build.<>c.<get_Doc>b__28_1() in C:\Code\CreateAndFake\build\nuke\Build.cs:line 157
   at Nuke.Common.Utilities.Collections.EnumerableExtensions.ForEach[T](IEnumerable`1 enumerable, Action`1 action)
   at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, ExecutableTarget target, IReadOnlyCollection`1 previouslyExecutedTargets, Boolean failureMode)
   at Nuke.Common.Utilities.Collections.EnumerableExtensions.ForEach[T](IEnumerable`1 enumerable, Action`1 action)
   at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, IReadOnlyCollection`1 skippedTargets)
   at Nuke.Common.Execution.BuildManager.Execute[T](Expression`1[] defaultTargetExpressions)

Possible Solution

Nuke.DocFX needs to be recompiled with latest Nuke.Common.

Steps to Reproduce

  1. Add packages to Nuke build project:
<PackageReference Include="Nuke.Common" Version="0.22.2" />
<PackageReference Include="Nuke.DocFX" Version="0.2.0" />
<PackageReference Include="docfx.console" Version="2.46.0" ExcludeAssets="build" />
  1. Call:
DocFXTasks.DocFXBuild();

Additional Information

Method signature was changed between version 0.21.2 and 0.22.0:

public static string GetPackageExecutable(string packageId, string packageExecutable, string framework = null) { }

public static string GetPackageExecutable(string packageId, string packageExecutable, string version = null, string framework = null) { }

Optional parameters don't create overloaded methods, they instead instruct the compiler to fill in the default for the method call if missing. So they are a breaking change just like adding a parameter normally is.

@lock
Copy link

lock bot commented Nov 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants