Creating a ASP.NET Core 1.0 application in 5 minutes using dotnet CLI


Last June 27 was launched the final release of .NET Core and ASP.NET Core 1.0.

Now, it is possible to generate a basic web application using only the dotnet command line interface (CLI).

The first thing that you need to do is to download the .NET Core SDK for your platform (Windows, Linux or Mac).

After that, you need to execute the following steps:

1. Create a folder for your project.

For now, we have four options (console, web, Lib and xunittest). That options can be listed by running the following command:

dotnet new -t –h

2. Run the command to generate the project files for web application template:

dotnet new -t web

3. Restore the packages:

dotnet restore

4. Compile the code:

dotnet build

5. Run the web application:

dotnet run

After that, you just need to navigate to the site http://localhost:5000. You are suppose to see the following page:

 

webtemplate

 

 

 

 

Comments (2)

  1. Jolienai says:

    5 min não, 3 min

Skip to main content