Question

I'm using codesmith to generate our CSLA layer, and have 3 separate Codesmith projects (.csp) to generate

  • CSLA Business Objects
  • Data Access
  • Scaffolded Unit Tests

Each of those project files have a list of target database tables within them, in the format:

<property name="EditableChild">
    ....
    <tableList>
      <table>
        <owner>dbo</owner>
        <name>Table1</name>
      </table>
      <table>
        <owner>dbo</owner>
        <name>Table2</name>
      </table>
    </tableList>
 </property>

I obviously don't want to maintain that list in three places. Is there any way we can share that same list of tables between the Codesmith project files, without merging them into a single project?

Was it helpful?

Solution

I work for CodeSmith Tools.. This currently isn't possible, but I've added this to the backlog. It would be cool if you could specify a source file with the content like you can do with connection strings in an app.config.

I've really wanted to move csla to use an xml file for entity generation. However, a lot of people don't want to maintain this xml file :(. This would however, solve this issue. You could always use the copy to clipboard feature in the property grid and then paste the properties to the other outputs in the csp. This would help keep these files in sync.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top