cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.91k stars 730 forks source link

DotNetTool Module: Add support for dotnet local tools #3209

Open augustoproiete opened 3 years ago

augustoproiete commented 3 years ago

Creating a new issue for tracking https://github.com/cake-contrib/Cake.DotNetTool.Module/issues/18 created by @gitfool given that GitHub doesn't allow transferring issues from one organization to another.


@gitfool wrote:

Note: I'm not sure this is a good idea and I'm currently stuck determining what the implementation looks like given local tools seem to be managed by the dotnet CLI.

I'll create a work-in-progress PR with how far I've got, including fixes for some minor bugs I found.

gitfool commented 3 years ago

This is a followup to the second part of https://github.com/cake-build/cake/issues/2685#issuecomment-702973435:

  • Integrating with dotnet local tools

Also, for this to integrate better with dotnet local tools, the #tool directive should use the local tool directly, presumably invoking dotnet <tool>, rather than extracting and copying what was previously a global tool into the Cake tools directory alongside addins and modules. (I'm hoping such a change would also avoid the quirk resulting from building the same directory in Windows and then WSL or Docker with a host mount, or vice versa, where you first need to explicitly delete any such copied dotnet tools which would be for the wrong platform.)