GithubHelp home page GithubHelp logo

raajmayukh / vsts-dotnet-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/azure-devops-dotnet-samples

0.0 0.0 0.0 593 KB

C# samples that show integration with Visual Studio Team Services and Team Foundation Server

Home Page: https://integrate.visualstudio.com/

License: MIT License

C# 100.00%

vsts-dotnet-samples's Introduction

Team Services Samples for .NET

buildstatus

This repository contains C# samples that show how to integrate with Team Services and Team Foundation Server using our public client libraries.

Explore

Samples are organized by "area" (service) and "resource" within the Microsoft.TeamServices.Samples.Client project. Each sample class shows various ways for interacting with Team Services and Team Foundation Server.

Run the samples

  1. Clone this repository and open in Visual Studio (2015 or later)

  2. Build the solution (you may need to restore the required NuGet packages first)

  3. Run the Microsoft.TeamServices.Samples.Client.Runner project with the required arguments:

    • /url:{value}: URL of the account/collection to run the samples against.
    • /area:{value}: API area (work, wit, notification, git, core, build) to run the client samples for. Use * to include all areas.
    • /resource:{value}: API resource to run the client samples for. Use * to include all resources.

IMPORTANT: some samples are destructive. It is recommended that you first run the samples against a test account.

Examples

Run all samples

Microsoft.TeamServices.Samples.Client.Runner.exe
    /url:https://fabrikam.visualstudio.com /area:* /resource:*

Run all work item tracking samples

Microsoft.TeamServices.Samples.Client.Runner.exe
    /url:https://fabrikam.visualstudio.com /area:wit /resource:*

Run all graph samples against vsts

Microsoft.TeamServices.Samples.Client.Runner.exe
    /url:https://fabrikam.vssps.visualstudio.com /area:graph /resource:*

Run all Git pull request samples

Microsoft.TeamServices.Samples.Client.Runner.exe
    /url:https://fabrikam.visualstudio.com /area:git /resource:pullrequests

Run all samples against a TFS on-premises collection

Microsoft.TeamServices.Samples.Client.Runner.exe
    /url:https://mytfs:8080/tfs/testcollection /area:git /resource:*

Save request and response data to a JSON file

To persist the HTTP request/response as JSON for each client sample method that is run, set the /outputPath:{value} argument. For example:

Microsoft.TeamServices.Samples.Client.Runner.exe
    /url:https://fabrikam.visualstudio.com /area:* /resource:* /outputPath:c:\temp\http-output

This creates a folder for each area, a folder for each resource under the area folder, and a file for each client sample method that was run. The name of the JSON file is determined by the name of the client sample method. For example:

|-- temp
    |-- http-output
        |-- Notification
            |-- EventTypes
                |-- ...
            |-- Subscriptions
                |-- CreateSubscriptionForUser.json
                |-- QuerySubscriptionsByEventType.json
                |-- ...

Note: certain HTTP headers like Authorization are removed for security/privacy purposes.

About the client libraries

For .NET developers building Windows apps and services that integrate with Visual Studio Team Services, client libraries are available for integrating with work item tracking, version control, build, and other services are now available. These packages replace the traditional TFS Client OM installer and make it easy to acquire and redistribute the libraries needed by your app or service.

See .NET client libraries for Team Services documentation for more getting started details.

Other useful resources

Contribute

For developers that want to contribute, learn how to contribute a sample.

vsts-dotnet-samples's People

Contributors

danhellem avatar willsmythe avatar msftgits avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.