locked
.NET VSTS Library... Documentation?! RRS feed

  • Question

  • Hi all,

    I'm currently trying to write a VS extension to connect and extract data from TFS.

    According to this web site, the correct approach would be to use the Client Libraries to perform my authentication

    https://docs.microsoft.com/en-us/vsts/integrate/get-started/authentication/authentication-guidance

    I managed to create a project to connect to TFS but I am finding that the Client Libraries are lacking a LOT (of documentation) about their content. I searched the web for a long time and all I can find is NuGet information about the dlls and no information about their API or how to use them...

    Although the REST API is fully documented, but I would like to use what is the recommended approach for my scenario, but without documentations I am left clueless about how to use them.

    Is there any place where I can find this documentation? 

    Tuesday, November 7, 2017 9:32 PM

All replies

  • Hi SlickRickD,

    You are looking for the website below:

    https://docs.microsoft.com/en-us/vsts/integrate/concepts/dotnet-client-libraries

    You can check out samples on our .NET Samples Page or directly on our .NET GitHub Repo.

    Best regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, November 8, 2017 7:41 AM
  • This is where I am. But I feel like there is a lot of documentation missing.

    Of course I'm rather new in trying to communicate with TFS but I am unable to find what I'm looking for.

    For example, how do I get the list of Projects for a give TFS Collection? Is there a way to rest pure REST GET request if I don't find what I'm looking for?

    The REST API is very well documented and this information can be found in a matter of minutes.

    https://docs.microsoft.com/en-ca/rest/api/vsts/core/projects/list

    But again, 

    Wednesday, November 8, 2017 1:43 PM
  • Well I guess its ok since the example do have a lot which does help me achieve what I want.

    However the lack on API documentation is not great. The REST API is so well documented!

    So I managed to display a list of the projects inside a collection.

    Now I want to display the list of releases for a give project. So I had to update my NuGet packages to use the preview version of the API.

    Howover, after the upgrade, my extension crash with the following error:

    and is caused by the following line:
       Dim teams As IEnumerable(Of WebApiTeam) = teamClient.GetTeamsAsync(project.Name).Result

    I suspect that for some reason a dll is trying to use a old version but not sure what and why... 

    No code was changed, just a pure nugget upgrade of my dlls to use 15.122.1-preview

    Wednesday, November 8, 2017 6:51 PM
  • Hi SickRickD,

    To list all the team projects in a collection using REST API in C#, please refer to the code snippet in this article, under Here it is in C# using the HttpClient class :

    https://docs.microsoft.com/en-us/rest/api/vsts/#create-the-request

    There is an example for get projects using C# .Net:

    https://www.codeproject.com/Questions/99412/How-to-connect-with-TFS-and-get-list-of-projects-f

    There is a release example:

    https://github.com/Microsoft/vsts-dotnet-samples/blob/master/ClientLibrary/Snippets/Microsoft.TeamServices.Samples.Client/Release/ReleasesSample.cs

    Best Regards


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Sunday, November 26, 2017 8:33 AM