tags:

views:

11

answers:

1

Hi to all,

RIA services generates all the client code in a single file (namespace.g.cs) for each domain service and DTO class. I was wondering whether it is possible to configure it to generate a separate file for each class?

JD.

Ps. The reason I am asking is I was hoping it would be easier to navigate classes using resharper as it is a bit tricky to navigate when all the classes are in one file.

+1  A: 

There is no easy way to get it generate separate files. MS chose the easier route when building that generator.

You could always write a little app to split it up into separate class files. The logic is not difficult. If you have to do the splitting often, or for a large team, it would be justifiable to spend half a day building it.

(Might even make one myself, as I have the same problem. If I do make one I will post it on my website for all to use)

Enough already
Cheers, let me know if you write something. The other question is, for resharper to work on the separated files, do they have to be included in the project. The nice thing I liked about resharpers file Structure (Cntrl+F11) was that it showed the partial methods so you can see the extension points.
JD
I assumed the separate files would replace the one large one in the project (hopefully without breaking it!) :)
Enough already
Not sure, probably should be okay. I think I may have a look at T4 templates to see how they work.
JD