2016-10-29 01:35:15 +08:00
---
2018-03-15 10:51:34 +08:00
title: Get Started with ASP.NET Core
2016-10-29 01:35:15 +08:00
author: rick-anderson
2017-08-09 07:22:51 +08:00
description: A quick tutorial that creates and runs a simple Hello World app using ASP.NET Core.
2016-10-29 01:35:15 +08:00
manager: wpickett
2018-01-29 23:21:31 +08:00
ms.author: riande
2017-10-19 06:40:07 +08:00
ms.date: 10/18/2017
2017-03-03 08:50:36 +08:00
ms.prod: asp.net-core
2018-01-29 23:21:31 +08:00
ms.technology: aspnet
ms.topic: get-started-article
2016-10-29 01:35:15 +08:00
uid: getting-started
---
2017-10-19 06:40:07 +08:00
# Get Started with ASP.NET Core
2016-10-29 01:35:15 +08:00
2017-08-09 07:22:51 +08:00
> [!NOTE]
2018-03-19 21:32:07 +08:00
> These instructions are for the latest version of ASP.NET Core. See [Getting Started with ASP.NET Core 1.1](xref:getting-started-1.1) for the 1.1 version of this document.
2016-10-29 01:35:15 +08:00
2018-03-20 12:04:00 +08:00
1. Install the [!INCLUDE[ ](~/includes/net-core-sdk-download-link.md )].
2017-08-09 07:22:51 +08:00
2. Create a new .NET Core project.
2016-10-29 01:35:15 +08:00
2017-12-22 07:21:39 +08:00
On macOS and Linux, open a terminal window. On Windows, open a command prompt. Enter the following command:
2017-08-09 07:22:51 +08:00
2017-09-07 05:57:00 +08:00
```terminal
dotnet new razor -o aspnetcoreapp
```
2017-08-09 07:22:51 +08:00
4. Run the app.
2016-10-29 01:35:15 +08:00
2017-09-07 05:57:00 +08:00
Use the following commands to run the app:
2016-10-29 01:35:15 +08:00
2017-09-07 05:57:00 +08:00
```terminal
cd aspnetcoreapp
dotnet run
```
2016-10-29 01:35:15 +08:00
2017-09-07 05:57:00 +08:00
5. Browse to [http://localhost:5000 ](http://localhost:5000 )
2017-10-10 07:31:07 +08:00
6. Open *Pages/About.cshtml* and modify the page to display the message "Hello, world! The time on the server is @DateTime .Now ":
2017-09-07 05:57:00 +08:00
2018-02-25 00:08:11 +08:00
[!code-html[ ](getting-started/sample/getting-started/about.cshtml?highlight=9&range=1-9 )]
2017-09-07 05:57:00 +08:00
7. Browse to [http://localhost:5000/About ](http://localhost:5000/About ) and verify the changes.
2016-10-29 01:35:15 +08:00
2017-08-09 07:22:51 +08:00
### Next steps
2016-10-29 01:35:15 +08:00
2017-08-09 07:22:51 +08:00
For getting-started tutorials, see [ASP.NET Core Tutorials ](tutorials/index.md )
2016-12-17 05:07:04 +08:00
For an introduction to ASP.NET Core concepts and architecture, see [ASP.NET Core Introduction ](index.md ) and [ASP.NET Core Fundamentals ](fundamentals/index.md ).
2017-08-09 07:22:51 +08:00
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 ](https://docs.microsoft.com/dotnet/articles/standard/choosing-core-framework-server ).