@@ -8,19 +8,19 @@ Run C# scripts from the .NET CLI, define NuGet packages inline and edit/debug th
88
99## NuGet Packages
1010
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 ` , ` net7 .0` |
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 ` , ` net7 .0` |
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/ ) | ` net6.0 ` , ` 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 ` |
1818
1919## Installing
2020
2121### Prerequisites
2222
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 ) .
2424
2525### .NET Core Global Tool
2626
@@ -52,11 +52,7 @@ Tool 'dotnet-script' (version '0.22.0') was successfully uninstalled.
5252
5353### Windows
5454
55- ``` powershell
56- choco install dotnet.script
57- ```
58-
59- We also provide a PowerShell script for installation.
55+ PowerShell script for installation.
6056
6157``` powershell
6258(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
569565
570566![ image] ( https://user-images.githubusercontent.com/1034073/65727087-0e982600-e0b7-11e9-8fa0-d16331ab948a.png )
571567
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+
572586## Team
573587
574588- [ Bernhard Richter] ( https://github.com/seesharper ) ([ @bernhardrichter ] ( https://twitter.com/bernhardrichter ) )
0 commit comments