This project is read-only.


Namespace collision


I have area in my MVC4 app and controllers in namespace AreaName.Controllers.
During build have error in

namespace T4MVC
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class AreaNameClass
    public readonly string Name = "AreaName";
    public AreaName.Controllers.HomeController Home = new AreaName.Controllers.T4MVC_HomeController(); // ERROR LINE

The type or namespace name 'Controllers' does not exist in the namespace 'T4MVC. AreaName' (are you missing an assembly reference?)

The problem is solved by adding addition area component in my code (Area.AreaName.Controllers, Area.AreaName.Models ...) or adding global in generated code:

public global::AreaName.Controllers.HomeController Home = new global::AreaName.Controllers.T4MVC_HomeController(); // ERROR LINE
Closed Jan 28, 2015 at 4:10 PM by KevinKuszyk
As part of our move to GitHub, we are closing all the outstanding issues on CodePlex.

If your issue is still valid, please re-open it on GitHub:

Thanks for contributing!


gps50 wrote Dec 20, 2013 at 6:52 AM


davidebbo wrote Dec 23, 2013 at 8:35 PM

Maybe adding global is the way to go. Feel free to send PR if you have the change.