It's all about the answers!

Ask a question

Multiple components in a single Visual Studio solution

Jonathan Byrne (2121) | asked Aug 19 '09, 2:25 p.m.
Im new to Jazz so I apologize if my terminology is incorrect. I want have a single Visual Studio solution that has multiple FTC components. Yes, these really are separate components and yes, I realize that a lot of people would not consider it appropriate to have them in the same solution. However, unit testing only takes you so far and it makes it much easier to debug issues if you have all components in the same solution.

So far I have only figured out a hack to do this. Below is a detailed description of how I got it to work. I was hoping there would be an easier way to do this.

    1) Create a directory on my computer that will contain all parts of the solution. (C:\Development\MySolution)
    2) Create a subfolder for a single FTC component. (C:\Development\MySolution\MyComponent1)
    3) Create a solution for that component. (C:\Development\MySolution\MyComponent1\MyComponent1.sln)
    4) Add the project(s) to that component solution (C:\Development\MySolution\MyComponent1\MyProject1\MyProject1.csproj)
    5) Use Share Project(s) in Jazz in Visual Studio to add the solution and projects to FTC.
    6) Check in the solution and accept the pending changes.
    7) Repeat steps three to six for each component I want in my big solution.
    8) Create a sub directory for my big solution. (C:\Development\MySolution\Solution)
    9) Create my big solution. (C:\Development\MySolution\Solution\MySolution.sln)
    10) Use Share Project(s) in Jazz in Visual Studio to add the solution to FTC.
    11) Add each of the projects to my big solution.
    12) Check in the big solution and accept the pending changes.

Here are a few problems I ran into that made me go down that convoluted path:

    I first tried this with one big solution file. When I used Share Project(s) in Jazz for a project, I didnt see any way to pick an FTC component, it always used the component of the solution.
    When I started using the procedure described above, I found that if I didnt put each component in a separate directory, they would automatically use the same FTC component. It seems that a single directory can only contain files from a single component.

So, I end up with a solution\project structure like this:


when all I really want is this:


As I am typing this, Im starting to reconsider the wisdom of setting it up without a subdirectory for each component. However, Im still curious if it is possible to do it that way. My main frustration is that all projects want to inherit the FTC component from the solution.

3 answers

permanent link
Jonathan Byrne (2121) | answered Aug 24 '09, 7:59 a.m.
Thanks for the response, I really appreciate it. It's nice to know we were thinking about it the same way as the experts.

permanent link
Sreerupa Sen (1.0k4) | answered Aug 23 '09, 12:50 a.m.
There were no changes at all wrt our guidelines wrt solutions and components from 1.0 to 2.0.

The team that developed the RTC Client for VS studio is a team of VS developers as well, and we ran into a situtation similar to yours, where it was much easier for us to run our unit tests if all our component projects belonged to the same solution. So we used the partitioned solution approach. In your case, MyComponent1, MyComponent2 would all have their own solutions which would be shared against individual components. Each solution would include projects from other solution as "existing project"s. This way you'd always have the latest source code in all your components and that's the way RTC recommends you do it as well.

You would also have a sort-of umbrella solution that you would use for making sure your components build with each other and that would include all projects from all solutions in it - that's where you could have all your unit tests. This could be shared against an additional component named say "FTC" or something that makes sense to you.

So your solution structure would look like this:

C:\Development\MySolution\FTC\FTC.sln (umbrella solution
for integration
and unit tests,
including projects
from all component

and so on. So all solutions are at the same level in the folder hierarchy - whether they're component solutions or the one you defined for integration builds/unit tests.

I discovered an article (Source Controlling Projects and Solutions in Team Concert for Visual Studio) that answered most of my questions. Were there any big changes between v1.0 and v2.0 on how to use RTC in Visual Studio?

permanent link
Jonathan Byrne (2121) | answered Aug 19 '09, 5:58 p.m.
I discovered an article (Source Controlling Projects and Solutions in Team Concert for Visual Studio) that answered most of my questions. Were there any big changes between v1.0 and v2.0 on how to use RTC in Visual Studio?

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.