Skip to content

Commit ce89271

Browse files
committed
Merge branch 'master' into feature/remote
2 parents 74b66ff + 5e06dc4 commit ce89271

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

README.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,38 @@ Run C# scripts from the .NET CLI.
1313

1414
### Prerequisites
1515

16-
The only thing we need to install is [.Net Core](https://www.microsoft.com/net/download/core)
16+
The only thing we need to install is [.Net Core SDK](https://www.microsoft.com/net/download/core).
17+
18+
### .Net Core 2.1 Global Tool
19+
20+
.Net Core 2.1 introduces the concept of global tools meaning that you can install `dotnet-script` using nothing but the .NET CLI.
21+
22+
```shell
23+
dotnet tool install -g dotnet-script
24+
25+
You can invoke the tool using the following command: dotnet-script
26+
Tool 'dotnet-script' (version '0.20.0') was successfully installed.
27+
```
28+
29+
The advantage of this approach is that you can use the same command for installation across all platforms.
30+
31+
> In order to use the global tool you need [.Net Core SDK 2.1.300 preview2](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview2) or higher. It also works with [.Net Core SDK 2.1.300 preview1](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview1), but that one had a different syntax: `dotnet install tool -g dotnet-script` and is now deprecated.
32+
33+
.NET Core SDK also supports viewing a list of installed tools and their uninstallation.
34+
35+
```shell
36+
dotnet tool list -g
37+
38+
Package Id Version Commands
39+
---------------------------------------------
40+
dotnet-script 0.20.0 dotnet-script
41+
```
42+
43+
```shell
44+
dotnet tool uninstall dotnet-script -g
45+
46+
Tool 'dotnet-script' (version '0.20.0') was successfully uninstalled.
47+
```
1748

1849
### Windows
1950

@@ -52,26 +83,12 @@ And run:
5283

5384
```
5485
docker run -it dotnet-script --version
55-
5686
```
5787

5888
### Github
5989

6090
You can manually download all the releases in `zip` format from the [Github releases page](https://github.com/filipw/dotnet-script/releases).
6191

62-
### .Net Core Global Tool
63-
64-
.Net Core 2.1 introduces the concept of global tools meaning that we can install `dotnet-script` using nothing but the `dotnet CLI`
65-
66-
```shell
67-
dotnet install tool -g dotnet-script
68-
```
69-
70-
The advantage of this approach is that we will execute the same command for installation across all platforms.
71-
72-
> In order to use the global tool we need at least [.Net Core SDK 2.1.300 preview1](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview1)
73-
74-
7592

7693
## Usage
7794

@@ -94,8 +111,6 @@ That is all it takes and we can execute the script
94111
dotnet script helloworld.csx
95112
```
96113

97-
98-
99114
### Scaffolding
100115

101116
Simply create a folder somewhere on your system and issue the following command.
@@ -404,10 +419,6 @@ We can specify this when executing the script.
404419
dotnet script -c release foo.csx
405420
```
406421

407-
408-
409-
410-
411422
## Team
412423

413424
* [Bernhard Richter](https://github.com/seesharper) ([@bernhardrichter](https://twitter.com/bernhardrichter))

0 commit comments

Comments
 (0)