Cannot get T4MVC to work with VS2010 and ASP.NET MVC 2
问题 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: