Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > How do you add a using/reference to a t4 template?
 

How do you add a using/reference to a t4 template?

I have a property based on a List<string> called DataMembers that I want to iterate through in the template.

<#@ Property Processor="PropertyProcessor" Name="DataMembers" #>

I get the following error:

: error CS0246: Compiling transformation: The type or namespace name 'TestPackage' could not be found (are you missing a using directive or an assembly reference?)

Yeah, probably, but how do I add one?

Where TetstPackage contains the DataMembers type.

I tried

<#@ Import Namespace="blah" #> with the same error. (there is no reference to even using Import Namespace in the docs)

TIA,A,

Jay

JayUrb  Thursday, May 18, 2006 12:27 AM
Found on http://blogs.msdn.com/garethj/archive/2005/06/01/T4Syntax.aspx

<#@ assembly name="Assembly" #>
<#@ property processor="PropertyProcessor" name="Name" type="Type, Assembly, Version, Culture, PublicKeyToken" #>
Renaud Bédard  Friday, May 19, 2006 5:18 PM
Found on http://blogs.msdn.com/garethj/archive/2005/06/01/T4Syntax.aspx

<#@ assembly name="Assembly" #>
<#@ property processor="PropertyProcessor" name="Name" type="Type, Assembly, Version, Culture, PublicKeyToken" #>
Renaud Bédard  Friday, May 19, 2006 5:18 PM
Thank you.
That blog has a lot of info that should be in the HOL.

I noticed that the latest GAT app for services is using codedom and not t4 templates. Is T4 on the way out?
Jay Jones  Friday, May 19, 2006 8:41 PM

You can use google to search for other answers

Custom Search

More Threads

• Tom, I see what has been keeping you busy post the E.L.
• How should I deploy additional binaries?
• Some items in HoL don't match GAT
• How does the .vstemplate run?
• Modify WCF Guidance Package
• GAT
• Get all classes from a Project?
• xinclude warning/error
• VS2k8 Type Conversion Issue (GAX/GAT Feb. 2008)
• Which APIs should be used with VSTS to do web test automation ?