# Using Visual Studio Template

## Content

Visual Studio Project template allows you to create a simple ASP.NET Core MVC application. To use C1 MVC controls, few additional steps are required to configure the project created using the basic Visual Studio project template.

1. Open Visual Studio and Select **Create a new project**.
2. In the **Create a new project** window, select **ASP.NET Core Web Application** and click **Next**.
    ![C1Web Visual Studio - Create new project window](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/images/create-a-new-project-window.png)
3. In the **Configure your new project** window, write your project name, choose location to save your project and click **Create**.
    ![C1Web Visual Studio - Configure new project window](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/images/new-mvc-project.png)
4. In the **Create a new ASP.NET Core web application** window, select the ASP.NET Core version, say **ASP.NET Core 3.1**, and click **Create**.
    ![C1Web Visual Studio - Core version selection window](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/images/core-version-selection.png)
5. From the **Solution Explorer**, expand the folder **Views** and double click the `_ViewImports.cshtml` file to open it.
6. In the \_ViewImports.cshtml file, add the following code.

    ```html
    @addTagHelper *, C1.AspNetCore.Mvc
    ```
7. (Optional) To add specific controls in your application, you need to add the following TagHelpers in the `_ViewImports.cshtml` file.

    | **Control** | **TagHelper** |
    | ------- | --------- |
    | Financial Chart | `@addTagHelper *, C1.AspNetCore.Mvc.Finance` |
    | FlexSheet | `@addTagHelper *, C1.AspNetCore.Mvc.FlexSheet` |
    | OLAP | `@addTagHelper *, C1.AspNetCore.Mvc.Olap` |
    | MultiRow | `@addTagHelper *, C1.AspNetCore.Mvc.MultiRow` |
    | FlexViewer | `@addTagHelper *, C1.AspNetCore.Mvc.FlexViewer` |
    | TransposedGrid | `@addTagHelper *, C1.AspNetCore.Mvc.TransposedGrid` |
    | TransposedMultiRow | `@addTagHelper *, C1.AspNetCore.Mvc.TransposedMultiRow` |
8. Add the ASP.NET MVC Core Edition references to the project. In the **Solution Explorer**, right click **References** and select **Manage NuGet Packages**. In **NuGet Package Manager**, select **https://api.nuget.org/v3/index.json** as the Package source. Search for **C1.AspNetCore.Mvc** package, and click **Install**.
    ![C1Web Visual Studio - Nuget Package Manager](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/images/mvc6nuget.png)

    >type=note
> **Note**: "**C1.AspNetCore.Mvc**" gets added under the "dependencies" within project.json file of your project once you restore the packages.
9. To use specific controls in your application, add the following NuGet Packages based on the control.

    | **Control** | **NuGet Package** |
    | ------- | ------------- |
    | Financial Chart | `C1.AspNetCore.Mvc.Finance` |
    | FlexSheet | `auto C1.AspNetCore.Mvc.FlexSheet ` |
    | OLAP | `auto C1.AspNetCore.Mvc.Olap ` |
    | MultiRow | `auto C1.AspNetCore.Mvc.MultiRow ` |
    | FlexViewer | `C1.AspNetCore.Mvc.FlexViewer` |
    | TransposedGrid | `C1.AspNetCore.Mvc.TransposedGrid` |
    | TransposedMultiRow | `C1.AspNetCore.Mvc.TransposedMultiRow` |
10. To add a license, right-click the solution name from the Solution Explorer or go to the Tools menu, and then select **MESCIUS License Manager**. Optionally, you can also generate runtime license key and add it to your application. For more information on generating license, see [Licensing](/componentone/docs/mvc/online-mvc-core/GettingStarted/Licensing) topic.
11. After completing the steps above, register the resources for the controls to be used in the application. For more information, see [Registering Resources](/componentone/docs/mvc/online-mvc-core/Configuring-your-MVC-Application/Registering-Resources).
12. Add map route using the following line of code (highlighted in bold) in the Configure method, Startup.cs file (For MVC Core 3.0 apps).

```auto
```
app.UseEndpoints(endpoints =>
{
   endpoints.MapRazorPages();
   endpoints.MapControllers();
});
```
```