How can I get T4MVC to regenerate the .generated.cs files?
Asked Answered
R

2

12

I am adding tests to the NerdDinner DinnersController class, and when I create the constructors needed to do Constructor Injection I get a conflict with the T4MVC-generated constructor (specifically, the base constructor). It looks like the base constructor is not generated if one already exists -- is this true? If so, what do I need to do to re-generate the T4MVC files?

Thanks, Dave

Redford answered 8/3, 2011 at 21:58 Comment(0)
A
33

Right-click on the T4MVC.tt file in Solution Explorer, then click Run Custom Tool. This will regenerate the files.

Ashleighashlen answered 8/3, 2011 at 22:10 Comment(0)
E
2

https://marketplace.visualstudio.com/items?itemName=BennorMcCarthy.AutoT4MVC

Click the link above, or if it disappears, in Visual Studio (2015):

  1. Click Tools
  2. Click Extensions and Updates
  3. On the right, search for AutoT4MVC
  4. Install, and restart VS

Your templates should now rebuild automatically every time you build.

Elery answered 12/1, 2017 at 0:53 Comment(4)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From ReviewAtony
Yea, I know. But what can I do? Post up a mirror? The answer is "Using this extension."Elery
the answer would rather have been an example as to howLorrinelorry
You want me to guide him through installing an extension. Fine.Elery

© 2022 - 2024 — McMap. All rights reserved.