I’m trying to use the T4 templates in my MVC project. This screencast suggests just copying the existing T4 templates for MVC into your solution and going from there. However when I try to compile I get this error:
Error 1 Compiling transformation: The type or namespace name 'MvcTextTemplateHost' could not be found (are you missing a using directive or an assembly reference?)
I have no idea what assembly this might live in, and google isn’t being much help with it. Does anyone know what assembly I should reference?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
For each template right click, select Properties and clear the Custom Tool property.
This has worked for my projects.
I got this error after installing twitter bootstrap via console
and my solution was to close visual studio and re-open it, and the error was gone.