TFS Workspaces across VS 2010 and 2012? - visual-studio-2010

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.

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.)

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.

Related

Visual Studio 2017 - Open Folder - TFVC Integration

I am working on an Angular 2+ project in Visual Studio 2017 but without a Visual Studio solution or csproj. We're just using the Angular CLI to generate the project serving the app using "ng serve". We are opening the folder in VS by going to File->Open->Folder, which is working well. But we are using TFVC (Team Foundation Version Control - 2015 on premise) as our source contorl and it seems as if when you open a Folder in Visual Studio 2017 it expects you to be using GIT. When I go to the Team Explorer window I only get GIT options.
I've tried:
Creating a folder apart form Angular
Checking the folder into TFS first before opening in Visual Studio
Reconnecting to the TFS server
NOTE: once the Folder is closed I have access to TFS again. I feel like I'm missing something obvious.
Check comments in this article:
https://blogs.msdn.microsoft.com/visualstudio/2016/04/12/open-any-folder-with-visual-studio-15-preview/

Visual Studio Team Services workspace error

I created a Visual Studio 2013 MVC project in Visual Studio 2013 Ultimate using Visual Studio Team Services through visualstudio.com. I have since reinstalled Windows and Visual Studio 2013 and have reopened the solution and receive error:
The solution you have loaded is bound to the source control server at https://{myaccount}.visualstudio.com/defaultcollection, but no workspace on that server could be located. If you do have a workspace on this server, and you want this solution to be opened under source control,
connect to that server using Team Explorer and then re-open the solution.
I am having difficulty locating how to setup and manage workspaces on my local machine and Team Services.
If you open visual studio and connect to your team project you should then be able to open the solution explorer. Once open you should see your project grated or as It is not maped locally.
Right click on your desired mapping folder level and map it to your local disk.
Note: You will need to map it to another location and pull across any uncommitted changes.

Local database cache template visual studio 2013

I can't locate "Local Database Cache template" in visual studio 2013. And I need it.
In Visual Studio 2010, my steps are:
I have a WPF project, by right-clicking the project node and choosing Add | New Item. Under the language, click Data and select the Local Database Cache template. Name this NorthwindLocalDataCache.sync and click Add. This opens the Configure Data Synchronization screen.
Now in VS 2013, is there an alternative way?
SQL Server Compact Edition has been deprecated... As such the Local Database Cache, which makes use of that product is no longer part of Visual Studio 2013.
Instead you should now make use of SQL Server LocalDB or a Service-based database.
From the Release Notes of Visual Studio 2013:
Local Database Cache
The Local Database Cache template and the Configure Data Synchronization dialog box are not included in Visual Studio 2013. You can use Visual Studio 2013 to open and run projects that were created in Visual Studio 2010 if Microsoft Synchronization Services v1.0 is installed, but if you want to update them in Visual Studio 2013, you must make all changes manually in code. As an alternative, you can continue to use Visual Studio 2010 to maintain and update these projects. For new development, target the new synchronization model that's provided by the Microsoft Sync Framework. For information, see Microsoft Sync Framework Developer Center
Source: https://msdn.microsoft.com/en-us/library/hh266747.aspx
As you can see, you're trying to follow a technique that is no longer supported. either upgrade it to the new Sync Framework or manually setup your syncs.

Add existing folder to Team Foundation Server 2010 that already exists for other Team Foundation Server 2012

I am workign with a central Team Foundation Server (2010) and I connect to it from my workstation. On my workstation I use both Visual Studio 2010 and 2012. I have installed both have the Team Explorer 2010 and 2012 and the latest patches and hotfixes.
I need to use both Visual Studio 2010 and 2012 because I am developing both .NET 4.5 code and SQL Server Reporting Server reports for SQL Server 2012.
I can configure both instances of Visual Studio to connect to TFS, I mapped my workspace in Visual Studio 2012 and I can interact with Source Control. I tried configuring Visual Studio 2010 to use the same working folder, I can connect to TFS, I can see the source control folder, but when I try to map it to the same local folder I get the following error message:
Map
The working folder "C:\TFS\Example" is already in use by the workspace JohnDoesPC; Doe, John on computer JohnDoesPC
I tried configuring the workspace mapping through the dropdown in the Source Control Explorer:
Team Explorer>project>Source Control>Map Window>(Set Local Folder)
And I tried it through the Source control menu under the File menu:
Go File>SourceControl>Manage Workspaces>(Highlight my showing workspace)>Edit>Try to add existing folder.
What am I missing? Do I need to map my solution folder to two different local folders? That would be very confusing and inconvenient!
The simplest way to put this is that I want two versions of TFS to point to the same local location. Is that possible? Or should I be creating a new project up just for my SSRS reports?
EDIT: See pic for more detail:
Make sure that in both Visual Studio 2010 and Visual Studio 2012 the same work space name is selected. If you cannot see the workspace of 2012 in Visual Studio 2010, check the advanced workspace settings of the workspace in 2012. Ensure that the workspace type is set to server.
When both Visual Studio versions are using the same workspace name, they should be able to see and use each others file mappings as well.
This is what the settings in 2012 should look like:
And that workspace should be visible in 2010 as well:
Make sure you select the same workspace name in both versions of Visual Studio:

I need the url for TFS for TeamCity?

I have setup teamcity in the past with Subversion, no problem. I have never used TFS before. We have TFS 2010 running and I can connect to via Visual Studio 2010. How do I find the URL for TeamCity? I am using TeamCity 6.
You can find the configured TFS URL from within Visual Studio by picking View -> Team Explorer, then looking at the top node. (I'm assuming for a second that you have only one TFS server set up; otherwise, there should be multiple top-level nodes.)
If you right-click on it and pick Properties, it will show you the full URL including protocol and port.
This is for Visual Studio 2008, but I'm pretty sure it's the same in 2010.

Resources