Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share code between projects in tfs 2010

Tags:

tfs

tfsbuild

What is the best way to handle code sharing in TFS 2010? We have a couple of Visual studio projects that other Visual Studio projects use. ex:

Shared Project

Project 1 Solution
-Shared Project
-Project 1 Project

Project 2 Solution
-Shared Project
-Project 2 Project

Also we have Third party code for example:
Third Party
-Telerik
--2009.1.402.35
--2009.02.0701.35

When I open my "Project 1" solution i want my shared code project to be included in that solution. (thats the way we work today).
We basically have one TFS Project that contains all the code. Now we want to use it the "right" (?) way, We would like to have Project 1 and 2 in separate TFS solutions.

If I for example makes sure we have all our project in the same structure on disk and just add the shared project to my Project 1 solution (even if the projects reside in two different TFS Projects) would that work with builds?

How have you solved the problem, I guess we are not the only ones having shared code between projects?

Cheers /Jimmy

like image 492
Jimmy Engtröm Avatar asked May 20 '10 08:05

Jimmy Engtröm


People also ask

How do I share code between projects in Visual Studio?

If you select Start Collaboration session from the Session Details menu, an invitation link to your session will automatically be copied to your clipboard. You can share this link with anyone you'd like to collaborate with, as long as they also have VS Code and the Live Share Extension Pack downloaded.

How do I connect an existing project to TFS?

In the Connect to Team Project dialog box, select the TFS instance you want to connect to, select the team project collection, select the team project you want to add to, and then click Connect. In the Team Explorer window, expand your team project, and then double-click Source Control.


1 Answers

I am not sure if there is a "right way" to share code using Team Foundation Server 2010. I would recommend that you check the following blog post as customers are sharing their learnings: http://blogs.msdn.com/jmeier/archive/2007/03/17/code-sharing-in-team-foundation-server.aspx.

Thanks, Ladislau

like image 131
Ladislau Szomoru Avatar answered Jan 01 '23 23:01

Ladislau Szomoru