Let's start by building a simple app.
-
1
Install the .NET Core SDK for Windows, macOS, or Linux.
-
2
Create a new ASP.NET Core app:
- dotnet new razor -o aspnetcoreapp
- cd aspnetcoreapp
-
3
Run the app
- dotnet run
-
4
Browse to http://localhost:5000
-
5
Open Pages/Index.cshtml and add the following to the page above the carousel:
<h1>Hello, world!</h1> <h2>The time on the server is @DateTime.Now</h2> -
6
Refresh the browser to see the change:
-
That’s it!
Next up, continue building your first ASP.NET Core app with Razor Pages.
