Questions tagged [t4mvc]

T4MVC is an open source utility for Microsoft ASP.NET MVC. It allows replacing magic strings in Views, Controllers and Links to content with strong names/types.

T4MVC is an open source utility for Microsoft ASP.NET MVC. It allows replacing magic strings in Views, Controllers and Links to content with strong names/types.

Resources

245 questions
5
votes
1 answer

T4MVC not passing parameters to base controller so generated code does not build

The problem: I get the following error when I build: "'.Controllers.ControllerBase' does not contain a constructor that takes 0 arguments" My base controller looks like this: public abstract class ControllerBase : Controller { public…
David McLean
  • 1,462
  • 1
  • 12
  • 27
5
votes
1 answer

T4MVC Base controller doesn't have default constructor

My controller is inherited from anothe controller which doesn't have default constructor. T4MVC generates the following constructor which assumes base controller has default constructor: protected MyControllerController(Dummy d) { } How can I…
SiberianGuy
  • 24,674
  • 56
  • 152
  • 266
4
votes
2 answers

T4MVC and Resharper Navigation

I frequently use Resharper's 'Go to Declaration' (ctrl + b in the Resharper Default Keymapping) keyboard shortcut to help with navigation within VS2010. Before I included a reference to T4MVC in my application, I would use "string refrences" and…
Gimbl
  • 1,500
  • 1
  • 13
  • 23
4
votes
2 answers

T4MVC support for static files in areas?

I'm starting to make heavy use of T4MVCs "links" feature (eg, @Links.Content.Site_css). Does anyone know if there's a way to generate methods for files that are stored in folders within areas? I've tried making the following modification to the…
Damien Sawyer
  • 5,323
  • 3
  • 44
  • 56
4
votes
3 answers

using T4MVC in a JS function

Take the following script. Notice the string '/Home/Index'. Using T4MVC, is there a way to specify this to get rid of the magic string?