Results 1 to 10 of 10

Thread: Reusing a very specific project for multiple solutions

Threaded View

  1. #6

    Thread Starter
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Reusing a very specific project for multiple solutions

    Ok, here's a screenshot of one of my solutions that uses this project (DatabaseLibrary):

    (C# example, but that's not the point)

    As you can see there are two 'tt' files, these are the T4 Text Templating files. As children of those files, the generated classes (.cs files, would be .vb for VB) that contain the code.

    The DatabaseLibrary project thus merely contains the information to generate the classes, nothing more, until I write the data.config (XML) file and let the tt files do their job. Only then are the actual database classes I'm going to use generated.

    Just for completion, here's a screenshot of the contents of Entities.tt and Entities.cs side by side, so you can see how the generating works basically:
    http://i55.tinypic.com/33cu974.jpg

    If I build this project into a DLL and reference it (so that there is only one project in the solution, which references a DLL of DatabaseLibrary), then there is no way to generate the classes anymore; they are 'fixed' in the DLL. There is no way to change them.

    Do you understand what I'm talking about now?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width