views:

521

answers:

3

I have been using the Codesmith framework NetTiers to generate a DAL etc., into a folder called, say, 'NetTiers', outside my main project's folder, and referencing the DLLs within that folder from my main project.

I've started using the Plinqo framework, and want to use the generated files from that framework within the same project as the one I'm using with NetTiers. (The reason I'm using both frameworks is that I want to get/learn the newer LINQ goodness from Plinqo, yet also have the familiar NetTiers code DAL, BLL syntax available, for compatibility.)

My question is: what's the best Visual Studio solution and file structure to use when using Codesmith templates like these? Should the frameworks' generated code be contained outside the main project and added as projects to the overall solution? Or should each template's generated code have its own solution? Should the generated files be within the main project's file structure?

I've tried combinations of each of these, and they each have their pros and cons. I'd like to know if there's a tried and tested pattern.

+1  A: 

I tend to just keep the .csp and the generated folder outside of my main app's folder. When adding a reference Visual Studio copies in the .DLLs from the built generated code. All of the generated projects sit under a main folder such as D:\CodeSmith Projects\

If you want to version control the .csp file it might be beneficial to move it in with the rest of your version controlled app files to tie it all together.

CRice
+1  A: 

We put the generated projects inside our solution. In fact on my current project I generated the nettiers files to the location that I wanted the files to be, and Started adding my own project files to that...But we have always kept the files in the solution, that way if i need to add something to the code in the concrete classes I can do it without having to open a whole new project.

ecathell
I've been experimenting with that - putting the generated projects within the main solution.
Rafe Lavelle
+3  A: 

Hello,

When it comes to .netTiers, I always compile the generated solution and add the assemblies as references to my project. This makes it much easier to upgrade/diff and regen.

However, there are going to be some cases where you would want to add your custom logic so keep this in mind.

Thanks

-Blake Niemyjski

Blake Niemyjski