In your command prompt, navigate to the new directory created on the previous step:
In your terminal, navigate to the new directory created on the previous step:
Then, run the following command:
You should see an output similar to the following:
watch : Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. Press "Ctrl + R" to restart. watch : Building... Determining projects to restore... All projects are up-to-date for restore. MyWebApp -> C:\Projects\MyWebApp\bin\Debug\net6.0\MyWebApp.dll watch : Started info: Microsoft.Hosting.Lifetime Now listening on: http://localhost:5055 info: Microsoft.Hosting.Lifetime Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime Hosting environment: Development info: Microsoft.Hosting.Lifetime Content root path: C:\Projects\MyWebApp\
dotnet watch command will build and start the app, and then update the running app whenever you make code changes. You can stop the app at any time by selecting Ctrl+C.
Wait for the app to display that it's listening on http://localhost:<port number> and for the browser to launch at that address.
Wait for the app to display that it's listening on http://localhost:<port number> and then open a browser and navigate to that address. In this example, it showed that it was listening on
Congratulations, you've built and run your first .NET web app!