0

Thanks to ranomore I was able to get the Subsonic T4 code generation to work in Visual Web Developer Express for my ASP.Net MVC project, however only using the LinqTemplates.

When I use the ActiveRecord templates with the same settings my project does generate files, but the code doesn't compile anymore...

Any ideas?

Community
  • 1
  • 1
  • I think it's a good idea to include error messages from the compiler .. – Gant Aug 23 '09 at 16:18
  • I got 32 errors, but this is the first one: The type 'ray.testDB' already contains a definition for 'DataProvider' ActiveRecord.cs line 21 –  Aug 23 '09 at 16:36

1 Answers1

1

Take the other T4 templates out first.

  • Thanks for your reply, it seems to be an issue with the project type. A ordinary ASP.Net Website project does not have any compile errors, but only the new MVC project has problems with it. So the work around is: creating a Asp.net Website project to generate the code and then dumping the output back in a MVC project. That works for now, but maybe someone could have a look at this at some point... Another minor issue I found is that the ActiveRecord.tt converts into a .txt file rather than a .cs file in VWD, while the other templates do convert into .cs files. –  Aug 26 '09 at 09:44