Visual Studio Development Bookmark and Share   
 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  Tuesday, May 16, 2006 8:45 PM
Figured out that the issue was an empty block of code in my template - "<#= #>". The generic stuff works fine.
dwj  Wednesday, May 17, 2006 4:09 PM
Figured out that the issue was an empty block of code in my template - "<#= #>". The generic stuff works fine.
dwj  Wednesday, May 17, 2006 4:09 PM

You can use google to search for other answers

Custom Search

More Threads

• How do I Migrate Guidance Packages from VS2005 to VS2008?
• Problems with installing Guidance Extensions and Software Factories.
• Exception message for the enduser?
• What determines whether project templates are or are not available in context?
• Fatal Login Error w/ Passport
• Guidance Automation Toolkit installation problems
• System.InvalidOperationException: Cannot find registration information for template
• ProjectTemplateLink does not support substitution parameters (as used by GAT & SFT)
• Drag and Drop Objects to Screen (Fault tree Application)
• Bug in Microsoft.Practices.RecipeFramework.Library.DteHelper.IsWebProject