Nov 26, 2012 at 6:49 AM
Edited Nov 26, 2012 at 6:52 AM
|
//External type Thing
namespace Baz.Qux
{
public class Thing
{
public Thing() {}
}
}
//MVC Controller
using Baz.Qux;
namespace Foo.Bar.Baz.Controllers
{
public partial class SomeController : Controller
{
public virtual ActionResult SomeAction(Thing thing)
{
...
}
}
}
//Generated T4MVC ActionResult
public override System.Web.Mvc.ActionResult SomeAction(Baz.Qux.Thing thing)
{
...
}
With the situation above I get a compile time error:
The type or namespace name 'Qux' does not exist in the namespace 'Foo.Bar.Baz' (are you missing an assembly reference?)
I thought adding the namespace to ReferencedNamespaces thus removing the requirement to fully qualify the type might work, but it did not.
Manually adding a using directive and deleting the qualification works, but will be overwritten next time I change the controller.
Thanks
Simon Hartcher
|