--- title: Adding a controller author: rick-anderson description: How to add a controller to a simple ASP.NET Core MVC app keywords: ASP.NET Core,MVC ms.author: riande manager: wpickett ms.date: 02/28/2017 ms.topic: get-started-article ms.assetid: e04b6665-1638-4d99-1636-d666c4634666 ms.technology: aspnet ms.prod: asp.net-core uid: tutorials/first-mvc-app-xplat/adding-controller --- # Adding a controller to a ASP.NET Core MVC app with Visual Studio Code By [Rick Anderson](https://twitter.com/RickAndMSFT) [!INCLUDE[adding-controller](../../includes/mvc-intro/adding-controller1.md)] * In **VS Code**, select the **EXPLORER** icon and then control-click (right-click) **Controllers > New File** ![Contextual menu](adding-controller/_static/new_file.png) [!INCLUDE[adding-controller2](../../includes/mvc-intro/adding-controller2.md)] >[!div class="step-by-step"] [Previous - Add a controller](start-mvc.md) [Next - Add a view](adding-view.md)