Most of the tools I use, are dotnet tools that are referenced from csproj file and automagically fetched by nuget. A few tools are old-school Framework tools, which should be copied into the tools directory before use. For the latter I have a GetTools Target.
My problem is declaring the Tool:
[LocalExecutable("./tools/MyFrameworkTool.exe")]
readonly Tool FrameworkTool;
This throws the following assertion:
Assertion failed: File.Exists(C:\Jenkins\workspace\Job\./tools/MyFrameworkTool.exe)
And the FrameworkTool is null.
How can I make a 'late' declaration of the tool, when it has been fetched by the GetTools Target?