--- title: Add a controller to an ASP.NET Core MVC app with Visual Studio for Mac author: rick-anderson description: How to add a controller to a basic ASP.NET Core MVC app using Visual Studio of Mac ms.author: riande ms.date: 06/28/2017 uid: tutorials/first-mvc-app-mac/adding-controller --- # Add a controller to an ASP.NET Core MVC app with Visual Studio for Mac By [Rick Anderson](https://twitter.com/RickAndMSFT) [!INCLUDE [adding-controller](../../includes/mvc-intro/adding-controller1.md)] ## Add a controller In **Solution Explorer**, right-click **Controllers > Add > New File**. ![Contextual menu](adding-controller/_static/add_controller.png) Select **ASP.NET Core** and **MVC Controller Class**. Name the controller **HelloWorldController**. ![Add MVC controller and name it](adding-controller/_static/ac.png) [!INCLUDE [adding-controller2](../../includes/mvc-intro/adding-controller2.md)] > [!div class="step-by-step"] > [Previous](../first-mvc-app/start-mvc.md) > [Next](adding-view.md)