“Visual Studio has added the full set of dependencies for ASP.NET MVC 5 to project” Can I reverse it?

By mistake I create a MVC 5 Controler instead Web Api 2 Controller in my .NET Web API Project and I received the following message:

Visual Studio has added the full set of dependencies for ASP.NET MVC 5 to project 'PROJECT_NAME'.
The Global.asax.cs file in the project may require additional changes to enable ASP.NET MVC.
  1. Add the following namespace references:
  2. using System.Web.Mvc; using System.Web.Routing; using System.Web.Optimization;
  3. If the code does not already define an Application_Start method, add the following method:
  4. protected void Application_Start() { }
  5. Add the following lines to the end of the Application_Start method:
  6. AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); BundleConfig.RegisterBundles(BundleTable.Bundles);

Is there a simple way to reverse this? Do I have to delete unnecessary files and dependencies one by one manually? Will previously created Api controllers work without changes?

Any help or assistance would be greatly appreciated.

#c-sharp #asp.net #.net

3 Likes2.65 GEEK