In your command prompt, run the following command to create your app:
In your terminal, run the following command to create your app:
dotnet new webapp -o MyWebApp --no-https
dotnet new command creates a new application.
webAppparameter selects what template to use when creating your app.
-oparameter creates a directory named
MyWebAppwhere your app is stored.
--no-httpsflag specifies not to enable HTTPS.
Several files were created in the
MyWebApp directory to give you a simple web application that is ready to run.
Program.cscontains the app startup code and middleware configuration.
Pagesdirectory contains some example web pages for the application.
MyWebApp.csprojdefines some project settings, such as, .NET SDK version to target.
launchSettings.jsonfile inside the
Propertiesdirectory defines different profile settings for the local development environment. A port number ranging between 5000-5300 is automatically assigned at project creation and saved on this file.
Select the Continue button below to go to the next step.
If you receive a message similar to
Template "ASP.NET Core Web App" could not be created. Failed to create the template. Details: Access to the path 'C:\Windows\System32\MyWebApp' is denied, change your current directory to one where you have permissions to create a new folder and try to run the command again.
If Windows can't find the SDK when you try to create the project and you are sure you have installed the SDK, your machine might have an issue with the PATH environment variable. See this Stack Overflow post for instructions on how to diagnose and fix this issue.
If you can't resolve the issue you're having, select the I ran into an issue button below to get help fixing the problem.