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 webApp -o aspnetcoreapp
- cd aspnetcoreapp
-
3
Install the HTTPS development certificate:
- dotnet dev-certs https --trust
-
4
Run the app:
- dotnet run
-
5
Browse to http://localhost:5001:
-
6
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>
-
7
Refresh the browser to see the change:
-
That’s it!
Next up, continue building your first ASP.NET Core app with Razor Pages.