In this post we will see how to write your first application using MVC 6 and Visual studio 2015.

We will go step by step.

First of all let us add simple MVC 6 project.

For that Open your Visual Studio 2015 and Create new project as shown below:

and then select empty Asp.Net 5 preview.

You can see the project structure like this:

What is new in folder structure?

src folder – contains all projects that contain source code that make up your application.

global.json – this is where you put solution-level settings, and allows you to do project-to-project references.

wwwroot – is a folder in which all your static files will be placed. These are the assets that you web app will serve directly to the clients including HTML, CSS, Image and JavaScript files.

project.json – contains project settings

startup.cs – this is where you put your startup and configuration code.

But wait! Is it MVC?

No it is not.

Our next step is to configure the site to use MVC. This requires changes to the project.json file and Startup.cs file. First, open project.json and add “Microsoft.AspNet.Mvc” to the “dependencies” property: