title: Extension Methods in T4
body: <p>I'm trying to use <a href="http://dnpextensions.codeplex.com/" rel="nofollow">PGK.Extensions</a> in a T4 template in VS2008 for VB.NET and I get:</p>
  
  <blockquote>
    <p>RemoveAllSpecialCharacters is not a member of string..</p>
  </blockquote>
  
  <p>My T4 headers:</p>
  
  <pre><code>&lt;#@ template language="VB" hostspecific="false" debug="true" inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" #&gt;
  &lt;#@ output extension="vb" #&gt;
  
  &lt;#@ assembly name="PGK.Extensions.dll" #&gt; // the dll is found
  &lt;#@ import namespace="StringExtensions" #&gt; //Try with and without namespace
  </code></pre>
  
  <p>Use of extension in block code:</p>
  
  <pre><code>&lt;#
     Me.WriteLine(item.Name.RemoveAllSpecialCharacters.ToUpper)
  #&gt;
  </code></pre>
  
  <p>RemoveAllSpecialCharacters is a string extension method from PGK.Extensions.dll.</p>
  
  <p>Can anybody help me?</p>
  
  <p>EDITED:</p>
  
  <p>OK. It's: </p>
  
  <pre><code>&lt;#@ template language="VBv3.5" ...
  </code></pre>
  
  <p>But this breaks DevArt T4 Editor intellisense and syntax highlight in VS2008 plugin. Use Tangible T4 Editor instead. </p>