"
 
 
 
ASP.NET (snapshot 2017) Microsoft documentation and samples

Getting started with ASP.NET Core MVC on Mac, Linux, or Windows

By Rick Anderson

This tutorial will teach you the basics of building an ASP.NET Core MVC web app using Visual Studio Code (VS Code). The tutorial assumes familarity with VS Code. See Getting started with VS Code and Visual Studio Code help for more information. [!INCLUDEconsider RP]

There are 3 versions of this tutorial:

Install VS Code and .NET Core

This tutorial requires the .NET Core 2.0.0 SDK or later. See the pdf for the ASP.NET Core 1.1 version.

Install the following:

Create a web app with dotnet

From a terminal, run the following commands:

mkdir MvcMovie
cd MvcMovie
dotnet new mvc

Open the MvcMovie folder in Visual Studio Code (VS Code) and select the Startup.cs file.

VS Code with Warn Required assets to build and debug are missing from ‘MvcMovie’. Add them? Don’t ask Again, Not Now, Yes and also Info - there are unresolved dependencies - Restore - Close
VS Code with Warn Required assets to build and debug are missing from ‘MvcMovie’. Add them? Don’t ask Again, Not Now, Yes and also Info - there are unresolved dependencies - Restore - Close

Press Debug (F5) to build and run the program.

running app
running app

VS Code starts the (xref:)Kestrel web server and runs your app. Notice that the address bar shows localhost:5000 and not something like example.com. That’s because localhost is the standard hostname for your local computer.

The default template gives you working Home, About and Contact links. The browser image above doesn’t show these links. Depending on the size of your browser, you might need to click the navigation icon to show them.

navigation icon in upper right
navigation icon in upper right

In the next part of this tutorial, we’ll learn about MVC and start writing some code.

Visual Studio Code help

Next - Add a controller





Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/AspNet-DocAndSamples-2017/aspnetcore/tutorials/first-mvc-app-xplat/start-mvc.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>