index > Visual Studio Guidance Automation Toolkit > Referencing a generic class with a t4 template

Referencing a generic class with a t4 template

Has anyone figured out a way to do the following in a t4 template:

public class <#= this.ClassName #> : EntityBase<<#= this.ClassName #>>
{
}

I want the class I'm generating to extend from a generic, but the templating engine throws an error:

Compiling transformation: No overload for method 'ToStringWithCulture' takes '0' arguments

Any thoughts?
dwj
Figured out that the issue was an empty block of code in my template - "<#= #>". The generic stuff works fine.
dwj
reply 2

You can use google to search for other answers

 

More Articles

• GAT breaking changes
• Package works when manually registered but not using msi
• Can't Register or Unregister Recipe
• Loosing Item Template Information
• Create Add DataSet recipe
• Build path
• Clean up of wizard base form.
• Custom UnfoldTemplate
• Input arguments for wizards
• Build Event programatically - set post build event
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Uninstall Failure
• Build Event programatically - set post b
• Code Snippets not uninstalling
• T3 template engine
• Nested Solution Folder Parent?
• Guidance actions are gone
• Trying to add a new class to the Referen
• Nested Project Templates
• Synchronizing - GAT Package Changes
• Code samples anywhere ?
• classname value
• Guidance Package Visual Studio 2005 Proj
• T4 in a custom tool
• how to add website project
• How does one set a default value?

Hot Articles

• enable GAT for existing projects
• Debugging your packages.
• Introduction to GAT
• GAT not compatible with W2K?
• How do I add an empty project folder?
• Code samples anywhere ?
• Is GAT dead?
• Added project reference not reflected
• How is GAT Package information persisted?
• Guidance Package Build
• Calling a recipe inside another recipe???
• Project References Guids?
• Exception thrown on Register SCSF
• Visual Studio hangs when I install the T
• Simulate DependentUpon with DTE class

Recommend Articles

• GAT/GAX for VS2005 RTM released!
• Problem with Specifying Command Bars
• Using FileNameEditor as a Value Editor
• How can you provide input to AddProjectD
• Slow loading Guidance Navigator
• How can I Organize templates in the &quo
• Solution Folder Name
• Conditional Branching of Recipe Actions
• Is there a way to use the T3 engine as a
• GAT not compatible with W2K?
• Error while unfolding template with empt
• Issue passing input parameters to actions
• Advice needed: What technology/kit/etc t
• Parameterising ProjectType in VS2005 tem
• How can you skip the UI when you run a r