0

I am creating my own global tool and I'm wondering what is the best practice or, better to say, the best way to use existing .Net CLI commands - for example,

dotnet new sln...

inside my own global tool project? Also, is this the way to go when you want to reuse some functionality that already exists in form of .Net CLI command inside custom global tool?

Thank you very much for replay.

  • I have to say this is quite broad as there can be many scenarios where one could just use `Process.Start()`, use [Buildalyzer](https://github.com/daveaglick/Buildalyzer) to load projects or drop project extension targets into a special folder to extend MSBuild logic. without a specific use case, I believe this question is too broad. – Martin Ullrich Jul 09 '18 at 18:30
  • Maybe take a look at open source project FlubuCore . It does exactly what you need https://github.com/flubu-core/flubu.core. More specific CoreTasks https://github.com/flubu-core/flubu.core/tree/master/FlubuCore/Tasks/NetCore – Stan88 Jul 11 '18 at 14:21
  • If you have any quetions you can contact me I am the author of FlubuCore – Stan88 Jul 11 '18 at 14:27

1 Answers1

0

While it's not a direct solution, if the CLI tool you want to integrate into your project happens to be open source, you have the option to clone the repository and make the necessary modifications. This approach worked well for me when I wanted to customize the ASP.NET Core Web API CLI tool to suit my specific requirements.

Bnaya
  • 715
  • 5
  • 7