Connecting to TFSPreview Programmatically - tfs

I'm attempting to connect to TFS Preview from a C# application.
At the moment, I'm stuck trying to authenticate. I've added a reference to the TFS 2010 DLLs (I believe that these will enable me to connect, please correct me if I am wrong!) and my test case is as simple as. The URL I am trying to connect to is in the form https://MYSERVERNAME.tfspreview.com/DefaultCollection
var teamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(workPath, new UICredentialsProvider());
teamProjectCollection.EnsureAuthenticated();
This fails with the following exception.
Team Foundation services are not available from server https://MYSERVER.tfspreview.com/$/defaultcollection.
Technical information (for administrator):
TF400813: Resource not available for anonymous access. Client authentication required.
I had hoped that providing a UICredentialsProvider in the factory method creating the team project collection that it'd use this to provide authentication. The TFS Preview service uses Windows Live authentication, but I had hoped that this would be covered.
Pointers in the right direction greatly appreciated!

I have found that you cannot connect to TFSPreview using the TFS2010 DLL's, most likely because of the web credentials that need to be provided in order to access the site.
By adding a reference to the TFS2012 DLLs (which come with the Visual Studio 2012 RC at %PROGRAMFILESX86\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0) I was able to successfully connect.

Download and install the Object Model for Team Foundation Server 2010SP1 and then install the Visual Studio 2010 SP1 Forward Compatibility GDR. Though this installer may look to only apply to Visual Studio 2010, it will happily update your Object Model installation if it's installed stand-alone.

Related

Keep vss and tfs together installed in the same machine

I have legacy projects bound to Visual SourceSafe and done with Visual Studio 2003. Now, I have recently installed Visual Studio 2017 and TFS in the same machine.
Now when I try to open a legacy project that is bound to Visual SourceSafe I get a sequence of errors. Below the screenshots (pixeled for confidenciality reasons).
It seems like when open a legacy project (bound to Visual SourceSafe) with legacy visual studio 2003, it tries to connect to the TFS server (obviously it cannot). It is happening since I have installed new Visual Studio 2017 and TFS in the same machine, it seems like they cannot live together in the same machine. So how can I keep both VSS and TFS installed in the same machine? Is it possible?
UPDATED:
It seems like VS2003 does not allow to switch SCC providers. The only way is to hack the registry to switch.
I have found some interesting things that explains how to do it and it seems to work, the problem is that some links are broken, they are too old and not available anymore.
Source safe with Team Foundation Server in VS.2003
Installed TFS Version Control Provider and Now my VS 2003 Projects lost connectivity to VSS 2005?
MSSCCI Provider installation error
In above links it is provided a solution that consists on hacking the registry but the link they provide is broken:
Switch SCC providers
UPDATE 2:
As Edward Thomson has suggested in his answer, I have created a new key 'HKCU\Software\Microsoft\VisualStudio\7.1\CurrentSourceControlProvider\ ' and set it with a string value: ProviderRegKey="SOFTWARE\Microsoft\SourceSafe". Below screenshot, but it is not working:
MSSCCI is the Microsoft Source Code Control Integration API, it was the original API provided by Visual Source Safe for IDE tools like Visual Studio. Early Visual Studio versions (like 2003) only spoke MSSCCI, and expected a version control provider to provide MSSCCI. As a result, you can only have one version control provider speaking that protocol.
The Team Foundation Server client APIs provide MSSCCI (for Team Foundation Version Control only, not Git). As a result, if you want to use Visual Source Safe, you will need to configure Visual Studio to speak to that set of libraries instead of the TFS set of APIs.
In slightly more recent versions of Visual Studio (like Visual Studio 2008), you can choose your MSSCCI provider on the fly, in Options > Source Control > Plug-In Selection. All the MSSCCI providers will be enumerated and you can select between Visual Source Safe and Team Foundation Version Control.
If you're using an earlier version of Visual Studio that did not have this option, then you can change your MSSCCI provider by updating the registry directly.
Find the registry key:
HKCU\Software\Microsoft\VisualStudio\7.1\CurrentSourceControlProvider\
And set:
ProviderRegKey="SOFTWARE\Microsoft\SourceSafe"
Update 7.1 in the key with the version of Visual Studio that you have installed (Visual Studio 2003 corresponds to version 7.1.)
Once you have made this change, you will not be able to use Team Foundation Verson Control from Visual Studio 2003 without changing that back.

Connecting VS 2015(Integrated) to TFS

I am using SQL Server Data Tools (which = Visual Studio 2015 (Integrated)) and I am having trouble being able to connect to TFS. I can see the Team Explorer window, but when I click "Manage Connections" --> "Connect to Team Foundation Server" ....nothing happens. I get no error or prompt or anything. Has anyone else had issues like this? Spent most of my day googling the problem yesterday and I can't figure out what is wrong.
I cannot use VS community as I am part of a company and it would violate the TOS.
Unfortunately, TFS is not included in the minimal VS that SSDT installs. If you're not able to use VS Community due to license restrictions, I would suggest looking into the Express edition (Web or Desktop) of Visual Studio 2015. It has a less restrictive license and supports the SSDT tools.

What would be the recommended way to integrate Microsoft Team Foundation Server into an iOS application

I am looking to create an application that allows a user to update Microsoft Team Foundation Server work items when performing certain things in the app.
Has anyone done anything similar themselves and if so what is the best way to make the updates to the TFS work items from within the app?
There is a Java API which is linked below:
http://www.microsoft.com/en-us/download/details.aspx?id=22616
Other than that a few google searches resulted in the following discoveries:
http://msdn.microsoft.com/en-us/library/bb130146.aspx
The link below tells you how you can create new work items via a URL:
http://msdn.microsoft.com/en-us/library/bb822136%28v=VS.90%29.aspx
** As per jessehouwing's comment below *
This only works on 2008 and 2010 I suspect. There migth be a similar Url for 2012 and 2013, but the whole WebAccess feature was rebuilt using ASP.NET MVC instead of WebForms, so the wi.aspx no longer exists. I'm not aware of an alternative.
Visual Studio Online an Team Foundation Server 2013 are gaining more and more json based REST Api's and have recently been upgraded to support OAuth for authentication. Some of these API's are still in preview, but they're a great resource for a mobile platform client.
For older versions of Team Foundation Server and the On-premise version you can either install the OData service, or build a custom webservice that employs the TFS Client Object Model internally to create the work items.
Should you want to build your webservice on top of a non-microsoft-platform, then you can employ the Java SDK for Team Foundation Server. This will allow you to communicate directly to TFS from a Linux or Mac server.
TFS 2013.4 will be able to show more pages in full screen mode without any chrome around it.

TFS support (plugin, external tool, etc) from within MonoDevelop?

Is there an easy way to integrate TFS for version control into MonoDevelop? I have a new MacBook Pro and an trying to determine which things I can do with Mac native apps and which I will need to run using Parallels.
I downloaded the Microsoft Visual Studio Team Explorer Everywhere 2010 command-line client, and was able to create a workspace, map a working folder and get the latest code. However, it would be nice to perform a get latest from inside MonoDevelop. In the Options there are External Tools I can try and setup, but I thought someone might have already done this. Has anybody done this?
Also, I see the the opentf project lists an alpha-quality MonoDevelop addin in the Feb 4, 2008 Release Notes, but that is two years ago. Has anybody used this?
You can always use Svn Bridge. In order to use it you will need to install it on the TFS server itself. It will then allow your TFS server to communicate via SVN protocol.
I retry to post an answer (sorry for my english i'm french). I has the same problem than you, i make some software for WP7 from visual studio and i use TFS in my compagny and want to make iphone applications with monotouch.
I Try openTF but i need direct integration in monodevelop, i find nothing in the internet and i decide to make my addin.
I release a test version (free of course) than you can try, it's integrate directly in monodevelop with TFS, and work for me on my mac.
You can see my blog at teamaddins.com i think it's can help.
Bruno
The least-bad solution I've come up with for Xamarin + TFS is to set up TFS through a Windows machine as normal, mount the TFS workspace as a SMB fileshare on the Mac, and manage checkouts manually in Visual Studio.
It's klugey, but there doesn't seem to be any reliable TFS tooling available for Mac.

Visual Studio 2010 Connect to SQL Server 2000?

We recently upgraded a major application to Visual Studio 2010.
Unfortunately, we are still using several database servers that are still running SQL Server 2000 (8.0.2055 to be precise).
According to this article (Link), "Since mainstream support for SQL Server 2000 ended on 04/08/2008, Visual Studio 2010 will only support debugging SQL Server 2005 and SQL Server 2008.
We have a lot of stored procedures that we keep in Source Control and execute them from within Visual Studio whenever we need to update them.
Is there any way around this restriction? 3rd-party tool, anything.
While researching this, I saw a few sites that indicate an ODBC connection could be used to get to the SQL2000 box. I was able to create a System DSN and then a Data Connection within VS2010, but am unable to connect to it.
Any help would be greatly appreciated.
Thanks.
Chris
The only way I've found so far is to extract our data library out of the project and keep it in VS 2008 targeted at 3.5 while we're building it. Once it's complete and ready, we open up the primary project in VS 2010, check out the changed files and then use the file system to copy the changed files over.
We then keep the supplementary 3.5 project in source control parallel to the primary project.
They will still build and function in .Net 4.0, but we have found that the IDE will not accept any connections or commands to them.

Resources