I'm trying to use a class within a T4 template in VS2008.
Here is a simplified version of what I'm doing...
<#@ template language="VB" debug="True" hostspecific="True" #>
<#@ output extension=".vb" debug="True" hostspecific="True" #>
<#@ assembly name="System.Data" #>
<#@ assembly name="System.Windows.Forms.dll" #>
<#@ assembly name="System.xml" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.Data.SQLClient" #>
<# Call (New SomeClass).Start()#>
<#+
Private Class SomeClass
Public Sub Start()
#>test<#+
End Sub
End Class
#>
When I run this template... I get the following error...
Error 1 Compiling transformation: 'Write' is not a member of 'Microsoft.VisualStudio.TextTemplatingF77BDE667ECAD297F587D3D651053846. GeneratedTextTransformation.SomeClass'. D:\Development\PrivateProjects\CodeGeneration\CodeGeneration\Generation\Common\test2.tt 16 1 CodeGeneration
Can anyone tell my why this causes the error it does and more importantly how to negate it's effects?