Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3760080
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:24:59+00:00 2026-05-19T10:24:59+00:00

I have a system of T4 templates — executed at run-time , not at

  • 0

I have a system of T4 templates — executed at run-time, not at compile-time — which generate the skeletons of many classes in my app. All these templates reside in a generator tool which is used from time to time to pre-generate new classes into the destination app. The tool contains a configuration class whose properties parameterize the output of all T4 templates.

Originally the configuration class was a static class. However, as the class generator tool grows, it’s better to make it non-static and rather make a new instance for each use. The problem is how to pass this instance to the instances of T4 templates. The natural way seems to be inheriting them from a common base which would be provisioned with the configuration class instance.

The problem is that the TextTransformation class, which would have been inherited by my custom T4 base class, is located in an assembly which (according to sources like this SO question) doesn’t ship with Visual Studio 2010. Instead it’s provided within the Visual Studio 2010 SDK.

The base class generated by VS2010, although itself having no ancestor, isn’t partial so there’s no way to ‘inject’ the custom ancestor via another partial declaration.

Thus the question is: Is there a way to inherit a run-time-executed T4 template from a custom base class without the need to install Visual Studio 2010 SDK?

Disclaimer: I’m not very familiar with T4, so I might be completely wrong about how to approach the problem. Hence any other architectural advice is welcome, although my aim isn’t to create a super-architected generator — it’s just a helper tool, which shall be simple and understandable to the occasional reader.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:24:59+00:00Added an answer on May 19, 2026 at 10:24 am

    The assembly containing the base class does actually ship with Visual Studio, but it is installed in the GAC with no reference assembly.
    The Visual Studio SDK just contains the referencable version of the DLL.

    Consequently if you’re creating a new base class in code, you need the VS SDK to build that base class, but not to use it. At rutime, the version in the GAC will be picked up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have decided to save templates of all system emails in the DB. The
I have a templates system in which I use images and other kinds of
we have a system to generate xlsx file from xlsx templates using jxls, Now
I have a template-esque system which can load bulk templates (more than one template
I have a 'template' system in my CMS rails app. Basically the whole HTML
I have System.Collections.Generic.Dictionary<A, B> dict where A and B are classes, and an instance
In Django's templates system, if I have a block that I want to make
We have a system built on a custom database, where many of the attributes
i have core T4 templates in subsonic to create my DAL. Connection strings which
I have a small rails app I got all gung-ho on tonight wanting to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.