I'm trying to do some custom integration with Visual Studio Team Foundation Service. Please note, this is NOT the on-premises version. I've figured out how to query the service via OData. I also found this sample. For the life of me though, I can't figure out how they created the service proxy to TFS. This proxy contains the helper classes which makes development easier.
How do I add a service proxy to Visual Studio Team Foundation Service? Typically, I would just use a URL. However, I can't seem to figure out which URL to use. Thank you
Have you checked out the tfs odata api documentation.
Also, here is a link to sample code that creates a web proxy for a TFS work item browser.
Hope this helps.
A Windows Store (WinRT) TFS Work Item Browser
Team Foundation Server OData API
Related
Good day.
I want to write an app for the work with builds and bugs in Team Services, previously Visual Studio Online (VSO). I've found the REST API, and it works, but it's not too comfortable to work with JSON. Is there any SDK for Team Services, or is that possible to connect to Team Services using standard TFS libraries from Microsoft?
Yes, you can use the .NET client libraries for Visual Studio Team Services (and TFS) to connect to VSTS just like how you connect to on-premise TFS. But if you are working with vNext build, I would recommend you to use the "Microsoft.TeamFoundationServer.Client" in the webpage which still use Rest API to connect to TFS since the client libraries API only support some basic operation with vNext build.
Does anyone know if there is a Visual Studio Team Services (http://visualstudio.com/) API? Please note I am referencing the "Service" and not the "Server".
I've been looking but I have been unable to find one.
See: Team Foundation Server OData API
Have a read, then follow the instructions from "Team Foundation Service authentication:" to set up your account/profile to access the Api.
You can then access the resources via the web Api.
There are also some sample applications near the top of that page that make use of this Api/OData.
As Edward and Christopher pointed out, the Client Object Model for the Cloud version of TFS and the on-premise version are identical, but not all API's will work with both systems. You can download the Client Object Model installer from the following location:
2012
2010 SP1 and Forward Compatibility GDR
Which API's work on which system is constantly changing, since new features are added to the cloud version all the time, while certain features are currently only available on the on-premise version (sharepoint integration and reporting for example).
Apart from that there is an OData API for TFS 2010 on-premise and that API is expected to be released for TFSvc and TFS on-premise in the near future. Probably coming to the TFSvc first.
Microsoft does provide REST ful as well as Client Object Model (DLL) based APIs which works both for on-premise Team Foundation Server and Visual Studio Team Services. But, REST ful API is still not complete, for example, there is still no end-point for getting drop-down field values. It is therefore recommended to use COM DLL APIs.
Visual Studio Team Services and Team Foundation Server now also has REST APIs, service hooks, and an extensions framework:
https://www.visualstudio.com/docs/integrate/overview
I am working with Odata and TFS. I was able to get the OdataTFS file downloaded and working. I am trying to write a client console application that will access TFS so I can run queries againest it. I am trying to figure out this line
var tfsData = new TFSData.TFSData(new Uri("https://codeplexodata.cloudapp.net");
The way I usually access information on TFS is to into visual studio 2010, click connect to TFS Server, type in the server name and thats it. But here I am unsure how to do it. I haven't found any materials on how to connect to a server rather than to a codeplex. Where would I find the uri for this? Any help anything at all would be great, i have read the first 15 google searches on odata and still a little lost.
TFS does not have any OData services included in the installation.
You need to install the OData Service for Team Foundation Server on your local TFS server in order to use OData against your on-premises TFS.
There seems to be a fault with my access to directories on Team Foundation Server.
See the image below.
I'm the only one with this problem. All of the other clients can connect to the server fine, so it must be my local copy of Team Foundation Server thats gone haywire.
Any ideas?
This is usually a permissions problem. Use the TFSAdmin Tool to check permissions on the SSRS and Sharepoint systems (which are separate from TFS itself, unfortunately). Check that the settings are working the way you intend by browsing directly to the Reporting website & the Team Project Portal from inside IE.
There are other possibilities, however.
Check the Application event log on the server to see if your attempts to connect generate any exceptions.
If you're using SQL Server 2008, make sure you have Team Explorer fully patched up to 2008 SP1. (you'll need to re-run SP1 if you installed Team Explorer afterward)
Make sure you're connecting to TFS using the same URI as other people. If you're using a fully-qualified domain and they aren't (or vice versa) you could be exposing a server configuration problem in TFS's Registration database. Details here: http://blogs.msdn.com/buckh/archive/2007/03/31/configuring-team-foundation-server-to-use-fully-qualified-domain-names.aspx Also, there is a known bug in the admin util: http://support.microsoft.com/default.aspx/kb/959126
Check, recheck, and re-recheck your proxy settings. Both software configuration (TFS inherits them from IE / Control Panel) and at the network level (whether you're on some LAN segment that gets proxied differently). Use an HTTP protocol analyzer on a good & bad machine to be certain.
I had the same issue after trying to connect to alternative address of our TFS server.
In my case it seemed that it just cached the previous TFS address although I changed it back to the original address.
What fixed it for me was to delete this folder:
C:\Users\<user>\AppData\Local\Microsoft\Team Foundation
I installed TFS 2008 Workgroup Edition a while back, and everything was running fine.
Recently I tried opening TFS to a couple of friends so that we can collaborate on a project. The Source Control portion is working correctly, but the Documents and Reports folders are not available (they have red crosses on them).
When I looked at the properties, I noticed that the URLs were using my internal machine name, not the external address (e.g. http://INTERNALNAME/Sites/MyProject instead of http://www.EXTERNAL-NAME.com/Sites/MyProject).
My preference would be to somehow use relative paths, so that if I ever decide to stop exposing TFS to the outside, I don't have to do anything.
I realize this may not be possible because TFS cannot make the assumption that Reporting Services and Share Point are on the same machine.... so is there at least an easy way to assign a new server name?
Yeah, relative paths cannot be used due to the way that TFS works - it sends back the full URL's to the Sharepoint and Reporting Services servers to the client machine.
To update the URL's that are used for sharepoint and reporting services to match your fully qualified domain name you want to use TFSAdminUtil. Remote desktop to the TFS server, open a Command Prompt window, and change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools.
At the command prompt, type the following command (all on one line):
TfsAdminUtil ConfigureConnections /SharepointUri:BaseSiteURL
/SharepointSitesUri:SharePointSite
/SharepointAdminUri:SharePointAdministration
/ReportsUri:ReportsUri
/ReportServerUri:ReportServer
Replacing the following strings
SharePointSite is the new URI for the SharePoint Products and Technologies site collection.
SharePointAdministration is the new URI for the SharePoint Central Administration Web site (used for new team project creation)
ReportsUri is the new URI for SQL Server Reporting Services.
ReportServer is the new URI for the ReportsService.asmx Web service.
BTW - If you have installed SP1 for Visual Studio Team System 2008 Team Foundation Server, the ReportServer parameter will not function correctly and you have to stick /ReportService.asmx on the end. For more information about this problem and its resolution, see this KB: Team Foundation Server 2008 SP1 TfsAdminUtil.exe 'ConfigureConnections' fails to properly set ReportServerUri.
For example, the following command would work with TFS 2008 SP1:
TfsAdminUtil ConfigureConnections /SharepointUri:http://tfs.external-name.com /SharepointSitesUri:http://tfs.external-name.com/Sites /SharepointAdminUri:http://tfs.external-name.com:17483 /ReportsUri:http://tfs.external-name.com/Reports /ReportServerUri:http://tfs.external-name.com/ReportServer/ReportService.asmx
One last thing to note is that if you are accessing your TFS server externally, then it is recommended that you do this using HTTPS to encrypt the TFS traffic. For more information on this configuration see the post on the MSDN site: Walkthrough: Setting up Team Foundation Server with Secure Sockets Layer (SSL) and an ISAPI Filter