views:

18

answers:

2

For reasons I won't go into I need to use CLR generics syntax in an ASP.NET MVC view.

I.E. NOT this:

System.Web.Mvc.ViewUserControl<someobject>

but this:

System.Web.Mvc.ViewUserControl`1[[someobject]]

When I run the application I get

Parser Error: could not load type `System.Web.Mvc.ViewUserControl`1[[someobject]]`

:(

How can I get this to work?

+2  A: 

Turns out anything inside the CLR generics syntax needs to be the fully qualified type name. I.E it needs the assembly on it:

System.Web.Mvc.ViewUserControl`1[[someobject,myassembly]]
Andrew Bullock
+1  A: 

I just put a web.config in my class library with nothing it in besides the view-engine declarations. Nothing was hurt from the process.

jfar
does that work? im sure i tried that... ill shall try again
Andrew Bullock
What version of resharper? i cant get this to work with 5.1.1
Andrew Bullock