I try to use PGK.Extensions in the T4 template in VS2008 for VB.NET, and I get:
RemoveAllSpecialCharacters is not a member of the string ..
My T4 headers:
<#@ template language="VB" hostspecific="false" debug="true" inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" #>
<#@ output extension="vb" #>
<#@ assembly name="PGK.Extensions.dll" #>
<#@ import namespace="StringExtensions" #>
Using the extension in block code:
<#
Me.WriteLine(item.Name.RemoveAllSpecialCharacters.ToUpper)
#>
RemoveAllSpecialCharacters is a line extension method from PGK.Extensions.dll.
Can someone help me?
Edition:
OK It:
<#@ template language="VBv3.5" ...
But this breaks down the DevArt T4 Editor intellisense and syntax underscore in the VS2008 plugin. Use the Tangible T4 Editor instead.
source
share