T4MVC Using Extension Methods in the Management Library

I wrote some razor helpers, and these helpers use features that include extension methods created by T4MVC. Now I want to move them to the management library so that they can be used in several mvc applications. The initial idea that I used is that I can put a copy of the template in the management library, and this works, the disadvantage is that the template used in the application then regenerates the same extension methods in the same namespace. Since I'm using the extension part that requires an interface for ActionResult, I need the namespace to stay the same.

I am wondering if there is a known way to use extensions in the management library, as well as an application that refers to the library, or is it a change to the required template, so that static extension methods can be generated or not through the flag in the settings file? I am also wondering if static extensions can be included in a separate cs file that lives next to the template. So, we have 2 classes T4Extensions and DynamicT4Extensions?

This may force the use of the IT4MVCActionResult interface, but

+5
source share
1 answer

This is similar, but not quite the same as http://forums.asp.net/p/1510753/3603100.aspx .

, , . , , - , .

, , , .

: , , .

, , T4MVC .

, , .:)

+2

All Articles