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
Then, navigate to the new directory created by the previous command:
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.
cd myWebApp command puts you into the newly created app directory.
Several files were created in the
myWebApp directory to give you a simple web application that is ready to run.
Startup.cscontains the app startup code and middleware configuration.
myWebApp/Pagesdirectory contains some example web pages for the application.
myWebApp.csprojdefines what libraries are referenced etc.
If you receive a message similar to
Template "ASP.NET Core Web App" could not be created. 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 you can't resolve the issue, use the
I ran into an issue button to get help fixing the problem.