Working with TFS and Odata - tfs

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.

Related

SQL Management Studio won't connect to TFS

I am doing some research regarding continuous integration with SQL servers. I downloaded some free trials of Red-Gate to play around with. However, I am having trouble getting my SQL Server Management studio to connect to TFS. The error I'm getting is that the page is not found. Here is a screenshot.
This is probably an incredibly easy fix, but I'm new to my job, so I'm a bit overwhelmed at the moment.
Since you can connect to TFS fine in VS2015. Then the settings of SQL with TFS should be no problem.
The most possibility should be the permission, make sure you have enough permission to open the TFS Database from SQL Management Studio.
Also you can check this link from MSDN TF31002: Unable to connect to this Team Foundation Server to find a solution.

Generating Service Proxy for Team Foundation Service from Visual Studio

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

Visual Studio Team Services API

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

Issues with duplicating TFS 2005 to a virtual server

We have a problem with our current TFS installation. For some reason, which I won't get into, the Sharepoint DBs (sts_content, sts_config) got corrupted. So now, none of our team-project sites work, we have no access to our documents and can't create new team projects. We can still work with the version control, though.
We wanted to "play" with the server and try to fix it, without affecting the users. So we duplicated the server to a virtual one. We now continued and changed all of the relevant configuration to point to the new server, as explained in the MSDN article.
The step of rebuilding the warehouse (with setupwarehouse) failed. Also, we can't access the VersionControl web service (ourserver:8080/VersionControl/v1.0/repository.asmx). We are seeing errors in the EventLog:
TF53002: Unable to obtain registration data for application Build.
TF53005: Unable to retrieve the Team Foundation Server installed UI culture.
TF53002: Unable to obtain registration data for application VersionControl.
TF30040: The database is not correctly configured. Contact your Team Foundation Server administrator.
The solutions suggested in this blog post did not assist. So now we're kind of stuck.
Any assistance will be appreciated.
This is a really old question, but what I would suggest doing is installing a fresh copy of Team Foundation Server 2010, then in the configuration wizard, select 'Upgrade' and choose your existing TFS2005 databases. This will allow you to get a working server up and running, without SharePoint and the Cube/Warehouse configured. You can then tackle each of those problems separately via the TFS Administration Console.

Force TFS to use relative paths or update locations

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

Resources