Frage

Any changes to actions or controllers results in errors or, worse, bizarre behaviour when the app runs.

For example, adding a new Action to a controller resulted in an Html.ActionLink call in a view actually calling the action.

I didn't know what had hit me...

In both cases, the problem is solved by uninstalling and re installing the t4mvc package.

Is there something I have to do to make T4 templates work with VS 2012??!

EDIT:

I forgot to mention that the project was upgraded from MVC 3 to MVC 4. It was working just fine in vs 2010 and MVC 3.

War es hilfreich?

Lösung

I have not seen issues running T4MVC in VS 2012.

"adding a new Action to a controller resulted in an Html.ActionLink call in a view actually calling the action"

That sounds like you simply didn't rerun T4MVC after modifying your controller. That's something that has always been needed, though there are some tools like AutoT4MVC that do this for you on build. But that's not a VS 2012 specific thing.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top