I'm trying to add the T4MVC templates to my project, but I'm experiencing some problems. I went to Codeplex and downloaded the latest version of T4MVC, and according to the instructions I just copied the two files T4MVC.tt
and T4MVC.Settings.t4
into the root of my web application.
Immediately, I got the following errors:
From T4MVC.cs
(generated file):
A namespace cannot directly contain members such as fields or methods
From T4MVC.tt
(the code generating template):
Compiling transformation: The type or namespace name 'ITextTemplatingEngineHost' could not be found (are you missing a using directive or an assembly reference?)
When I open T4MVC.cs
, it only contains one line:
ErrorGeneratingCode
I found this post that suggests just building again, but that solution does not solve my problem - in fact, it doesn't change a thing. What should I do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…