@@ -8,19 +8,19 @@ Run C# scripts from the .NET CLI, define NuGet packages inline and edit/debug th
8
8
9
9
## NuGet Packages
10
10
11
- | Name | Version | Framework(s) |
12
- | ------------------------------------- | ------------------------------------------------------------ | -------------------------------- |
13
- | ` dotnet-script ` (global tool) | [ ![ Nuget] ( http://img.shields.io/nuget/v/dotnet-script.svg?maxAge=10800 )] ( https://www.nuget.org/packages/dotnet-script/ ) | ` net6.0 ` , ` net5.0 ` , ` netcoreapp3.1 ` |
14
- | ` Dotnet.Script ` (CLI as Nuget) | [ ![ Nuget] ( http://img.shields.io/nuget/v/dotnet.script.svg?maxAge=10800 )] ( https://www.nuget.org/packages/dotnet.script/ ) | ` net6.0 ` , ` net5.0 ` , ` netcoreapp3.1 ` |
15
- | ` Dotnet.Script.Core ` | [ ![ Nuget] ( http://img.shields.io/nuget/v/Dotnet.Script.Core.svg?maxAge=10800 )] ( https://www.nuget.org/packages/Dotnet.Script.Core/ ) | ` netcoreapp3.1 ` , ` netstandard2.0 ` |
16
- | ` Dotnet.Script.DependencyModel ` | [ ![ Nuget] ( http://img.shields.io/nuget/v/Dotnet.Script.DependencyModel.svg?maxAge=10800 )] ( https://www.nuget.org/packages/Dotnet.Script.DependencyModel/ ) | ` netstandard2.0 ` |
17
- | ` Dotnet.Script.DependencyModel.Nuget ` | [ ![ Nuget] ( http://img.shields.io/nuget/v/Dotnet.Script.DependencyModel.Nuget.svg?maxAge=10800 )] ( https://www.nuget.org/packages/Dotnet.Script.DependencyModel.Nuget/ ) | ` netstandard2.0 ` |
11
+ | Name | Version | Framework(s) |
12
+ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- -------------------------------- |
13
+ | ` dotnet-script ` (global tool) | [ ![ Nuget] ( http://img.shields.io/nuget/v/dotnet-script.svg?maxAge=10800 )] ( https://www.nuget.org/packages/dotnet-script/ ) | ` net6.0 ` , ` net5.0 ` , ` netcoreapp3.1 ` |
14
+ | ` Dotnet.Script ` (CLI as Nuget) | [ ![ Nuget] ( http://img.shields.io/nuget/v/dotnet.script.svg?maxAge=10800 )] ( https://www.nuget.org/packages/dotnet.script/ ) | ` net6.0 ` , ` net5.0 ` , ` netcoreapp3.1 ` |
15
+ | ` Dotnet.Script.Core ` | [ ![ Nuget] ( http://img.shields.io/nuget/v/Dotnet.Script.Core.svg?maxAge=10800 )] ( https://www.nuget.org/packages/Dotnet.Script.Core/ ) | ` netcoreapp3.1 ` , ` netstandard2.0 ` |
16
+ | ` Dotnet.Script.DependencyModel ` | [ ![ Nuget] ( http://img.shields.io/nuget/v/Dotnet.Script.DependencyModel.svg?maxAge=10800 )] ( https://www.nuget.org/packages/Dotnet.Script.DependencyModel/ ) | ` netstandard2.0 ` |
17
+ | ` Dotnet.Script.DependencyModel.Nuget ` | [ ![ Nuget] ( http://img.shields.io/nuget/v/Dotnet.Script.DependencyModel.Nuget.svg?maxAge=10800 )] ( https://www.nuget.org/packages/Dotnet.Script.DependencyModel.Nuget/ ) | ` netstandard2.0 ` |
18
18
19
19
## Installing
20
20
21
21
### Prerequisites
22
22
23
- The only thing we need to install is [ .NET Core 3.1 or .NET 5.0 SDK ] ( https://www.microsoft.com/net/download/core ) .
23
+ The only thing we need to install is [ .Net 6.0 or .Net 7.0 ] ( https://www.microsoft.com/net/download/core ) .
24
24
25
25
### .NET Core Global Tool
26
26
@@ -52,11 +52,7 @@ Tool 'dotnet-script' (version '0.22.0') was successfully uninstalled.
52
52
53
53
### Windows
54
54
55
- ``` powershell
56
- choco install dotnet.script
57
- ```
58
-
59
- We also provide a PowerShell script for installation.
55
+ PowerShell script for installation.
60
56
61
57
``` powershell
62
58
(new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/dotnet-script/dotnet-script/master/install/install.ps1") | iex
@@ -569,6 +565,24 @@ We will also see this when working with scripts in VS Code under the problems pa
569
565
570
566
![ image] ( https://user-images.githubusercontent.com/1034073/65727087-0e982600-e0b7-11e9-8fa0-d16331ab948a.png )
571
567
568
+ ## Specifying an SDK
569
+
570
+ Starting with ` dotnet-script ` 1.4.0 we can now specify the SDK to be used for a script.
571
+
572
+ For instance, creating a web server in a script is now as simple as the following.
573
+
574
+ ``` csharp
575
+ #r "sdk:Microsoft.NET.Sdk.Web"
576
+
577
+ using Microsoft .AspNetCore .Builder ;
578
+
579
+ var a = WebApplication .Create ();
580
+ a .MapGet (" /" , () => " Hello world" );
581
+ a .Run ();
582
+ ```
583
+
584
+ > Please note the the only SDK currently supported is ` Microsoft.NET.Sdk.Web `
585
+
572
586
## Team
573
587
574
588
- [ Bernhard Richter] ( https://github.com/seesharper ) ([ @bernhardrichter ] ( https://twitter.com/bernhardrichter ) )
0 commit comments