MvcTextTemplateHost not found

。_饼干妹妹 提交于 2019-11-27 17:26:56

问题


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?


回答1:


For each template right click, select Properties and clear the Custom Tool property. This has worked for my projects.




回答2:


I got this error after installing twitter bootstrap via console

Install-Package twitter.bootstrap.mvc4.sample

and my solution was to close visual studio and re-open it, and the error was gone.



来源:https://stackoverflow.com/questions/1045066/mvctexttemplatehost-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!