Here's the scenario, I've extended MvcWebRazorHostFactory so I can do a little bit of extra view magic at build time. The exact magic doesn't matter.
The registration in my ~\Views\Web.config looks like so:
<host factoryType="StackExchange.MyNamespace.MyFactory, StackExchange.MyNamespace" />
There's to the appropriate assembly in the project, a copy of the assembly in a \lib folder, and I've confirmed that it's copied to \bin as expected. Furthermore, the actual view magic does happen when views are built so ASP.NET itself is actually finding everything.
What doesn't work in Visual Studio (2012)'s Razor Syntax Highlighting.

Above is a snapshot of how the syntax highlighting fails. As a rule, anything not in a namespace directly @using'd cannot be found (and thus gets the red squiggly underline) and the @model directive doesn't works. This points to some trouble getting at our automatically included namespaces in the Web.config.
The tooltip for the error on @model is "The name 'model' does not exist in the current context".
Through trial and error I've narrowed the root cause to the above host config section, although we have some other tweaks around Razor (a custom pageBaseType for example) it's that one line that breaks everything.
Things I've tried thus far:
- Strong naming the assembly
- Inst
