Text templates (aka T4) is a great feature in Visual Studio, that proves helpful in many scenarios. I use it for instance in developing Alchemy. However, it has a significant drawback: it does not generate code automatically when you build your solution. To build the files and generate their output you have to manually run either Run Custom Tool command for each .tt file, or Transform All Templates for the entire solution.

Run Custom Tool

Transform All Templates

The good news is that Visual Studio 2010 has added capabilities for building the text templates files automatically at the build time. Basically, what you have to do is two things: first install the Visual Studio Visualization and Modeling SDK. Second, manually add the following to the project file:

   <PropertyGroup>
      <TransformOnBuild >true</TransformOnBuild>
   </PropertyGroup>

   <Import Project=
     "$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets" />

And that should do the trick. When you build the project, the .tt files will also be built.

To read more about this topic see:

, , , , Hits for this post: 7551 .

Yesterday I have installed Visual Studio 2010 and decided to try my VSBuildStatusAddin. It work on the first try, only with a change to the .AddIn configuration file.

Here is some screen shots in Visual Studio 2010.

VSStatusBuild in Visual Studio 2010

VSStatusBuild in Visual Studio 2010

Visual Studio 2010 about window with VSbuildStatus addin

Visual Studio 2010 about window with VSbuildStatus addin

The images above show a new version of the add-in, 1.1.0. This new version provides the following features:

  • displays the build/clean/deploy progress on a status bar
  • shows information about latest available version with link to download page
  • as already explained, works in Visual Studio 2010

The new version is available at the Visual Studio Gallery.

, , , , Hits for this post: 16100 .

I have fixed several bugs on version 1.0.4 of my VSBuildStatus add-in for Visual Studio that displays the status of a build/clean/deploy operation. The bugs were mainly about the batch builds. The new version is 1.0.5.

You can download this Visual Studio 2005 & 2008 add-in from here. If you are using a previous build I encourage you download and use the latest.

, , , , Hits for this post: 13308 .