Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Workspaces across VS 2010 and 2012?

I am currently developing on Visual Studio 2012 RC using TFS Preview for source control. I would like to create an SSIS Integration project, which requires me to use Visual Studio 2010. However, when I connect to TFS from VS 2010, it automatically creates a new workspace and does not list the VS 2012 workspace.

If I issue the tf workspaces command from the VS 2010 command prompt, I see only the VS 2010 workspace, and if I issue the command from the VS 2012 command prompt, I see only the VS 2012 workspace (both indicate the same colleciton is being used).

Is there some way I can get VS 2010 to see the VS 2012 workspace? I would prefer not to have to have two copies of source code just to be able to use VS 2010 for the SSIS project.

like image 390
Andrew Keller Avatar asked Jul 01 '12 01:07

Andrew Keller


People also ask

What are TFS workspaces?

You use the TFS workspace to map a local working folder on your PC to a Source Control Folder within a TFS project repository. It is assumed that have TFS 2013 open and a TFS Team Project already exists for you to use in Version Control of the Packages of your Enterprise Architect project.

Where are TFS workspaces stored?

This workspace is defined as a local workspace, which means all changes to files will be tracked locally. All the metadata is stored in a hidden folder at the root of the workspace, named $tf.

How do I change TFS workspace?

Go in to manage Workspaces and click edit. On the edit workspace window select the one you want to change. Then click remove.


2 Answers

TFS 2012 introduces a new concept called local workspaces, which differ subtly from the behavior of workspaces in previous versions of TFS (the old default behavior is now called a server workspace.) Local workspaces do not require read-only files and instead allow files to be edited without checking out from the server, and they are intended to be more suitable for small to medium sized workspaces. For this reason, local workspaces are the default in TFS 2012.

Local workspaces, however, are not compatible with TFS 2010 and TFS 2010 clients will not be able to use a new local workspace.

You can convert the workspace that you created with your VS 2012 client to a server workspace. In the Edit Workspace dialog, select Advanced, and you can change the type from a Local to a Server workspace.

At that point, you should be able to connect with VS 2010 and choose that TFS workspace.

(Note that it's not sufficient to use tf workspaces as that will return a cached copy of your workspace list - you will need to connect to the server either with Visual Studio 2010 or with a tf.exe command that talks to the server.)

like image 157
Edward Thomson Avatar answered Oct 03 '22 21:10

Edward Thomson


In addition to the Location="Server" property mentioned in other answers/comments, the File Time property must be "Current", as shown below.

Workspaces created in Visual Studio 2012/2013 with either Location="Local" or File Time="Checkin" are not visible/usable in Visual Studio 2010.

enter image description here

like image 44
Richard II Avatar answered Oct 03 '22 20:10

Richard II