-
-
Notifications
You must be signed in to change notification settings - Fork 38
Async quick start
Adam Ralph edited this page Sep 20, 2018
·
11 revisions
- Install .NET Core SDK 2.0.0 or later.
- In a console:
mkdir targets cd targets dotnet new console dotnet add package Bullseye
- Using your favourite text editor or IDE, add this to
targets.csproj
:<PropertyGroup> <LangVersion>latest</LangVersion> </PropertyGroup>
- Replace the contents of
Program.cs
with:using System.Threading.Tasks; using static Bullseye.Targets; class Program { static async Task Main(string[] args) { Target("default", async () => await System.Console.Out.WriteLineAsync("Hello, world!")); await RunTargetsAsync(args); } }
- Back in your console:
dotnet run
- For help:
dotnet run -- --help