Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasmulli/globalclitoolsexample
Example for global CLI tools
https://github.com/dasmulli/globalclitoolsexample
Last synced: 21 days ago
JSON representation
Example for global CLI tools
- Host: GitHub
- URL: https://github.com/dasmulli/globalclitoolsexample
- Owner: dasMulli
- License: unlicense
- Created: 2018-01-23T16:11:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-23T16:24:33.000Z (almost 7 years ago)
- Last Synced: 2024-10-25T13:12:07.861Z (26 days ago)
- Language: C#
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example for global .NET Core tools
This repository contains example tool projects that show how global tools can be used.
This sample needs a .NET Core Sdk version of at least 2.1.300 - Preview.## How to run
Clone the repository, and execute this at its root directory:
```sh
$ dotnet pack -c Release
$ dotnet install tool -g sayhi.tool
$ dotnet install tool -g greet.tool
```You may see warnings about prerelease version numbers, which you can ignore if you are using preview tooling.
Then open a new command line window / terminal (you can skip this if your environment is already set up) and run the commands:
```
$ sayhi
sayhi
Hi martin!
```The second command is named `dotnet-greet` which means that you can also run this as:
```
> dotnet greet
Hi martin.ullrich!
```Note that at the time of publishing (january 2018), there is a bug which prohibits this from being run as a CLI verb. You can run it using `dotnet-greet` (with a hyphen instead of a space) instead.