Get Started with ASP.NET Core


These instructions are for the latest version of ASP.NET Core. See Getting Started with ASP.NET Core 1.1 for the 1.1 version of this document.

  1. Install the .NET Core SDK 2.0 or later.

  2. Create a new .NET Core project.

    On macOS and Linux, open a terminal window. On Windows, open a command prompt. Enter the following command:

    dotnet new razor -o aspnetcoreapp
  3. Run the app.

    Use the following commands to run the app:

    cd aspnetcoreapp
    dotnet run
  4. Browse to http://localhost:5000

  5. Open Pages/About.cshtml and modify the page to display the message "Hello, world! The time on the server is @DateTime.Now ":

    @model AboutModel
        ViewData["Title"] = "About";
    <p>Hello, world! The time on the server is @DateTime.Now</p>
  6. Browse to http://localhost:5000/About and verify the changes.

Next steps

For getting-started tutorials, see ASP.NET Core Tutorials

For an introduction to ASP.NET Core concepts and architecture, see ASP.NET Core Introduction and ASP.NET Core Fundamentals.

An ASP.NET Core app can use the .NET Core or .NET Framework Base Class Library and runtime. For more information, see Choosing between .NET Core and .NET Framework.