AspNetCore.Docs/aspnetcore/getting-started.md

1.5 KiB

title author ms.author manager ms.date ms.topic ms.assetid ms.prod uid
Getting Started rick-anderson riande wpickett 10/14/2016 article 73543e9d-d9d5-47d6-9664-17a9beea6cd3 aspnet-core getting-started

Getting Started

  1. Install .NET Core

  2. Create a new .NET Core project:

    mkdir aspnetcoreapp
    cd aspnetcoreapp
    dotnet new
    
  3. Update the project.json file to add the Kestrel HTTP server package as a dependency:

    [!code-csharpMain]

  4. Restore the packages:

    dotnet restore
    
  5. Add a Startup.cs file that defines the request handling logic:

    [!code-csharpMain]

  6. Update the code in Program.cs to setup and start the Web host:

    [!code-csharpMain]

  7. Run the app (the dotnet run command will build the app when it's out of date):

    dotnet run
    
  8. Browse to http://localhost:5000:

    image

Next steps