VS2008 templates and $if$ directives
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