aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Incorrect namespace for controllers

Open blfuentes opened this issue 12 years ago • 3 comments

When a project with a name like 'mvc6 getting started' is created the autogenerated namespace for Controllers classes is incorrect

For other classes like 'Startup.cs' the namespace is correctly written as 'mvc6_getting_started'

using Microsoft.AspNet.Mvc;

// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860

namespace MVC6 Getting Started.Controllers
{
    public class HomeController : Controller
    {
        // GET: /<controller>/
        public IActionResult Index()
        {
            return View();
        }
    }
}

blfuentes avatar Jun 10 '14 13:06 blfuentes

@mayurid can you track this for tooling?

Eilon avatar Jun 10 '14 15:06 Eilon

This issue is already fixed in the latest tooling. I see the following:-

namespace mvc_getting_started.Controllers
{
    public class HomeController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }
    }
}

mayurid avatar Jun 12 '14 13:06 mayurid

Great, sounds like it's fixed for the next preview then.

Eilon avatar Jun 12 '14 17:06 Eilon