Getting Started with ASP.NET Core

  1. Install .NET Core

  2. Create a new .NET Core project:

    mkdir aspnetcoreapp
    cd aspnetcoreapp
    dotnet new web
    

    Notes:

    • On macOS and Linux, open a terminal window. On Windows, open a command prompt.
    • Previous versions of .NET Core required a t parameter, that is dotnet new -t web. If you get an error running dotnet new web, install the latest .NET Core. dotnet (with no parameters) will display the .NET Core version.
  3. Restore the packages:

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

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

Next steps

For more 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 runtime. For more information, see Choosing between .NET Core and .NET Framework.