Today I found that the VS 2008 new wizard template engine supports $if$ directives. This was supported in the old .vsz format but now it is also available in vstemplates.
If we take a look at the existing windows form item template provided with VS 2008 we can see:
Â
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
$if$ ($targetframeworkversion$ == 3.5)using System.Linq;
$endif
$using System.Text;
using System.Windows.Forms;
namespace $rootnamespace$
{
   public partial class $safeitemrootname$: Form
   {
       public $safeitemrootname$()
       {
           InitializeComponent();
       }
   }
}
Â
Really cool, isn’t it?
Pablo

