dcameron Posted January 3, 2013 Report Share Posted January 3, 2013 What's the best way to organize projects with shared dependencies? Here's a sample scenario: Project1 and Project2 both have a dependency on Lib1 and Lib2 Lib1 also has a dependency on Lib2 I need to be able to have TeamCity check this out and build it, too. I have not been able to successfully create xlinks to solve this. Whenever I use xlinks, I always end up in a situation where it tells me there's a change for Project1.csproj, but when I attent to commit it, it tells me there is no change. If I attempt to update, then it tells me there is a change pending. Link to comment Share on other sites More sharing options...
wvd_vegt Posted January 3, 2013 Report Share Posted January 3, 2013 Hi, I just keep my projects and components as separate visual studio projects (each in a separate plastic workspace + repository) and add them as existing projects in various visual studio workspaces to the project that needs them. No Xlinks required. That way i can debug and edit the depenencies and also check them in nicely into their own plastic workspaces & repo's. But i do not use teamcity so do not know it's constraints. regards Link to comment Share on other sites More sharing options...
manu Posted January 3, 2013 Report Share Posted January 3, 2013 What's the best way to organize projects with shared dependencies? I would say Xlinks. Here's a sample scenario: Project1 and Project2 both have a dependency on Lib1 and Lib2 Lib1 also has a dependency on Lib2 I need to be able to have TeamCity check this out and build it, too. If you don't generate repository loops with the xlinks there should not be any problem. I have not been able to successfully create xlinks to solve this. Whenever I use xlinks, I always end up in a situation where it tells me there's a change for Project1.csproj, but when I attent to commit it, it tells me there is no change. If I attempt to update, then it tells me there is a change pending. This is a little bit strange, does it appear as changed in the pending changes view? Can you try in a branch new workspace? I'm available to have an online meeting to check this behavior. Link to comment Share on other sites More sharing options...
dcameron Posted January 3, 2013 Author Report Share Posted January 3, 2013 I'll give it another try and see what happens. Link to comment Share on other sites More sharing options...
manu Posted January 3, 2013 Report Share Posted January 3, 2013 Perfect, please tell me how can I help. Link to comment Share on other sites More sharing options...
dcameron Posted January 3, 2013 Author Report Share Posted January 3, 2013 I have my repos back to normal now, and here's where I'm at: C.csproj depends on UT.csproj and CP.csproj main.csproj depends on C.csproj, UT.csproj, and CP.csproj (and 5 more projects) I added my xlinks to project C, checked them in, then did an update to get the xlinked projects. I added all 8 projects to the solution in VS, then made project-references. I always end up with a problem that forces me to delete my workspaces and repos and start over. Link to comment Share on other sites More sharing options...
dcameron Posted January 3, 2013 Author Report Share Posted January 3, 2013 Onece I get all my xlinks created, then check-in, I perform an update. I always get a bunch of "This item loaded twice" errors Link to comment Share on other sites More sharing options...
manu Posted January 3, 2013 Report Share Posted January 3, 2013 Correct me if I'm wrong but I think that you are creating loops with your xlinks and that's not allowed (duplicated item loaded error) Link to comment Share on other sites More sharing options...
dcameron Posted January 3, 2013 Author Report Share Posted January 3, 2013 I don't think I'm creating any loops. mainproj --subproj1(xlink) ----subproj7(xlink) ----subproj8(xlink) --subproj2(xlink) ----subproj8(xlink) --subproj3(xlink) --subproj4(xlink) --subproj5(xlink) --subproj6(xlink) --subproj7(xlink) --subproj8(xlink) Link to comment Share on other sites More sharing options...
manu Posted January 3, 2013 Report Share Posted January 3, 2013 Nop, there're no loops but you are loading the same repository several times, which is not allowed. The subproj8 repository is loaded 3 times by the mainproj, subproj1 and subproj2 repositories. Is not possible to remove the subproj1 and subproj2 references and reuse the one you have in mainproj? Link to comment Share on other sites More sharing options...
dcameron Posted January 3, 2013 Author Report Share Posted January 3, 2013 subproj7 and subproj8 are utility-type projects that are used by lots of other projects. subproj1 depends on subproj8, AND mainproj also depends on subproj8 (as well as subproj1) Link to comment Share on other sites More sharing options...
dcameron Posted January 3, 2013 Author Report Share Posted January 3, 2013 How would I do this in a VS sln? Link to comment Share on other sites More sharing options...
manu Posted January 3, 2013 Report Share Posted January 3, 2013 Well, you are able by adding the project reference. Right click in the project -> Add reference -> In the "Projects" tab select the one you are going to reuse. I think it's going to be: 1) Faster to compile. 2) Cleaner 3) You avoid duplicated projects and code. Link to comment Share on other sites More sharing options...
dcameron Posted January 3, 2013 Author Report Share Posted January 3, 2013 Okay, I won. Between not quite grokking the xlinks, Nuget dependencies, and TeamCity's build process, I had to restructure a few things before I got it right. Thanks for the push in the right direction Link to comment Share on other sites More sharing options...
manu Posted January 4, 2013 Report Share Posted January 4, 2013 Here to help. If you need further help just ask here. Link to comment Share on other sites More sharing options...
fhkd Posted May 22, 2013 Report Share Posted May 22, 2013 Hello, we are currently evaluating several source code revision control systems to decide which we will use in the future. Beside some little bugs Plastic SCM seemed to be the best choice, but today I found this topic whit the following statement: ... you are loading the same repository several times, which is not allowed. For me it seems to be a bug or at least one major limitation. Is that really intented? Regards Link to comment Share on other sites More sharing options...
manu Posted May 31, 2013 Report Share Posted May 31, 2013 We are on the path of developing the support of multiple xlinks targeting the same repo in the same workspace. Link to comment Share on other sites More sharing options...
diegohb Posted August 26, 2013 Report Share Posted August 26, 2013 is this still in the works? Link to comment Share on other sites More sharing options...
calbzam Posted August 27, 2013 Report Share Posted August 27, 2013 Hi, Plastic 4.2.39.458 includes support for multiple Xlinks pointing to the same repositry!! Regards, Carlos Link to comment Share on other sites More sharing options...
diegohb Posted August 27, 2013 Report Share Posted August 27, 2013 awesome, downloading latest now.. thanks! Link to comment Share on other sites More sharing options...
diegohb Posted August 27, 2013 Report Share Posted August 27, 2013 what about being able to create xlinks to a specific directory INSIDE a linked repo ? is that supported? Link to comment Share on other sites More sharing options...
calbzam Posted August 27, 2013 Report Share Posted August 27, 2013 Hi, At the moment is not possible to create a Xlink to a directory inside a linked repo. As a workaround, you can use cloaking rules to avoid updating some directories to your workspace. From de documentation: Through a submenu, these options offer to modify a cloaked list, by adding or removing an entry for each selected item. Cloaked items are items that the update operation won't download by default from the repository to the workspace. Download can be forced using the update forced operation instead. This is convenient in some scenarios, for instance when there are big files in the repository that are updated often, but you don't really work with them, so you prefer to skip downloading those cloaked files every time you switch the workspace to a different branch or do an update of the workspace. Cloaked items are defined as entries in file named cloaked.conf. Regards, Carlos Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.