Eric Polerecky bio photo

Director, Professional Services @RightBrain_Net - 50% engineer, 50% entrepreneur. Former: CTO @Wantify, @agilesoftware, @grasshopper

Eric Polerecky

Email Twitter LinkedIn Github Stackoverflow


Xamarin Mobile
ASP.NET MVC has one small hook into Visual Studio, the ability to right click and add views and controllers.


This feature is small, hell since I’ve been using spark I almost forgot about it, that is until I started working on a simple administration section. The application has enough entities that “Right Click –> Crud” would make just the right tool.



ASP.NET MVC provides customizable code templates for the view/controller content. There are a few really good articles on how to get started.


  1. Include the CodeTemplates in my project
  2. Change the output extention to .spark
  3. image

  4. Modify the markup to sparkup
  5. Phase 3: Profit.


ASP.NET MVC uses a custom tool to process the T4 templates.

<span class="str">MvcTextTemplateHost</span>

It ignores the output extension directive in T4 templates.

(Click play) Price is Right Losing Horns sound bite



MvcTextTemplateHost is included in Microsoft.VisualStudio.Web.Extensions.dll and this DLL that is not “part” of MVC code that was open sourced.


I’d love to write a Visual Studio addin to create spark views but I just don’t have the time. However; I do wonder if I can just have spark parse the .aspx and .ascx files.