Wednesday, July 21, 2010

T4MVC add-in and resource compression update

The T4MVC add-in and the dot less css add-in add-ins have been officially merged into the chirpy codeplex project.   Really love the design time javascript/stylesheet minimization and combination. This is really a great project and one of my favorite add-ins...of course I am not biased in any way.  :-)

You can read all about the features of this with Evan Nagle's latest post here.  In addition to his post on how to install, don't forget this add-in is in the VS2010 extension manager - so that should make it really easy to install and update.

One of the new T4MVC related features put into the latest release is 'Smart Run T4MVC'.   If you turn on this option in the chirpy settings, it will only run the T4MVC template when it should.    That means it will only run it if you change a MVC file that would cause it to be refreshed - instead of on every save operation.  Of course it relies strongly on convention locations to determine this.   It runs the template if any of the following happen:

Add/Remove/Rename any file in /Content or /Scripts
Add/Remove/Rename/Edit any file in /Controllers or /Areas/{anyarea}/Controllers
Add/Remove/Rename any file in /Views or /Areas/{anyarea}/Views

For those people with _really_ large project and/or slower computers, this should help with any speed issues and in general is just a good optimization.  If you turn this feature off, it runs the template when you save any file like it used to.