문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top