Pablo Galiano : VS2008 templates and $if$ directives

Subscriptions

<March 2010>
SuMoTuWeThFrSa
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

News

Subscribe to Pablo Galiano by Email

Post Categories

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

posted on Thursday, March 13, 2008 5:36 AM by pga

What do you think?

(required) 
required 
optional
required