Saturday, April 06, 2019

Creating a new MVC web application with .Net Core CLI

Start a command prompt by searching for cmd in .

To check what version of .Net Core that is installed type:

dotnet --version

Make a root directory for your web application.

mkdir MvcWebApp
move into the folder.

cd  MvcWebApp

Create a mvc web application (this step can be changed to create a webapi or empty web application, see the full documentation here:
dotnet new mvc
list the created files and folders.


Directory of C:\temp\MvcWebApp

<DIR>          .
<DIR>          ..
            36 .bowerrc
           178 appsettings.Development.json
           113 appsettings.json
           207 bower.json
           628 bundleconfig.json
<DIR>          Controllers
<DIR>          Models
           397 MvcWebApp.csproj
<DIR>          obj
           626 Program.cs
         1 428 Startup.cs
<DIR>          Views
<DIR>          wwwroot
8 File(s)          3 613 bytes
7 Dir(s)

No comments: