All Projects → microsoft → Azure Devops Dotnet Samples

microsoft / Azure Devops Dotnet Samples

Licence: mit
.NET/C# samples for integrating with Azure DevOps Services and Azure DevOps Server

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Azure Devops Dotnet Samples

azure-sphere-hardware-designs
Hardware reference designs for Azure Sphere chips created and maintained by the Azure Sphere team at Microsoft
Stars: ✭ 26 (-93.23%)
Mutual labels:  microsoft, samples
Tv Samples
Multiple samples showing best practices in app development on Android TV.
Stars: ✭ 377 (-1.82%)
Mutual labels:  samples
Windows Build Tools
📦 Install C++ Build Tools for Windows using npm
Stars: ✭ 3,280 (+754.17%)
Mutual labels:  microsoft
Dxut
DXUT is a "GLUT"-like framework for Direct3D 11.x Win32 desktop applications; primarily samples, demos, and prototypes.
Stars: ✭ 341 (-11.2%)
Mutual labels:  microsoft
Dotnetguide
🦸【C#/.NET/.NET Core学习、工作、面试指南】概述:C#/.NET/.NET Core基础知识,学习资料、文章、书籍,社区组织,工具和常见的面试题总结。以及面试时需要注意的事项和优秀简历编写技巧,希望能和大家一起成长进步👊。【让现在的自己不再迷漫✨】
Stars: ✭ 308 (-19.79%)
Mutual labels:  microsoft
Js Samples
Samples for the Google Maps JavaScript v3 API
Stars: ✭ 362 (-5.73%)
Mutual labels:  samples
List Of Testing Tools And Frameworks For .net
✅ List of Automated Testing (TDD/BDD/ATDD/SBE) Tools and Frameworks for .NET
Stars: ✭ 303 (-21.09%)
Mutual labels:  microsoft
Pnp Js Core
Code moved to https://github.com/pnp/pnpjs. This repository is archived.
Stars: ✭ 382 (-0.52%)
Mutual labels:  microsoft
Onedrive
#1 Free OneDrive Client for Linux
Stars: ✭ 5,104 (+1229.17%)
Mutual labels:  microsoft
Xnagamestudio
The Education library from the Xbox Live Indie games repository, valuable for MonoGame Developers for advanced samples
Stars: ✭ 332 (-13.54%)
Mutual labels:  samples
Cntk World
🌎 Simple and ready-to-use deep learning examples for the Microsoft Cognitive Toolkit (CNTK)
Stars: ✭ 335 (-12.76%)
Mutual labels:  microsoft
Corefx
This repo is used for servicing PR's for .NET Core 2.1 and 3.1. Please visit us at https://github.com/dotnet/runtime
Stars: ✭ 17,924 (+4567.71%)
Mutual labels:  microsoft
Fx11
Effects for Direct3D 11 (FX11) is a management runtime for authoring HLSL shaders, render state, and runtime variables together.
Stars: ✭ 365 (-4.95%)
Mutual labels:  microsoft
Flixel Demos
Collection of demos for HaxeFlixel
Stars: ✭ 312 (-18.75%)
Mutual labels:  samples
Woa Deployer Lumia
Making your Lumias great again!
Stars: ✭ 380 (-1.04%)
Mutual labels:  microsoft
Awesome Privacy
A curated list of services and alternatives that respect your privacy because PRIVACY MATTERS.
Stars: ✭ 303 (-21.09%)
Mutual labels:  microsoft
Dynamics 365 Workflow Tools
Dynamics 365 Workflow Tools is a Community solution that expands Microsoft Dynamics 365 (CRM) Workflow features with lots of new posibilities. This helps you to build very advanced Codeless solutions in CRM.
Stars: ✭ 331 (-13.8%)
Mutual labels:  microsoft
Azure Spring Boot
Spring Boot Starters for Azure services
Stars: ✭ 352 (-8.33%)
Mutual labels:  microsoft
Rtvs
R Tools for Visual Studio.
Stars: ✭ 382 (-0.52%)
Mutual labels:  microsoft
Socialphish
The most complete Phishing Tool, with 32 templates +1 customizable
Stars: ✭ 378 (-1.56%)
Mutual labels:  microsoft

.NET samples for Azure DevOps

Build Status

This repository contains C# samples that show how to integrate with Azure DevOps Services and Azure using our public client libraries, service hooks, and more.

Explore the samples

Take a minute to explore the repo. It contains short as well as longer examples that demonstrate how to integrate with Azure DevOps Services and Azure DevOps Server.

In the ClientLibrary folder, you'll find the following:

  • Samples: short reusable code blocks demonstrating how to call specific APIs.
  • Quickstarts: self-contained programs demonstrating a specific scenario, typically by calling multiple APIs.

About the official client libraries

For .NET developers, the primary (and highly recommended) way to integrate with Azure DevOps Services and Azure DevOps Server is via our public .NET client libraries available on Nuget. Microsoft.TeamFoundationServer.Client is the most popular Nuget package and contains clients for interacting with work item tracking, Git, version control, build, release management and other services.

See the Azure DevOps client library documentation for more details.

Sample console program

Simple console program that connects to Azure DevOps using a personal access token and displays the field values of a work item.

using System;
using System.Threading.Tasks;
using Microsoft.TeamFoundation.WorkItemTracking.WebApi;
using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models;
using Microsoft.VisualStudio.Services.Common;
using Microsoft.VisualStudio.Services.WebApi;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length == 3)
            {
                Uri orgUrl = new Uri(args[0]);         // Organization URL, for example: https://dev.azure.com/fabrikam               
                String personalAccessToken = args[1];  // See https://docs.microsoft.com/azure/devops/integrate/get-started/authentication/pats
                int workItemId = int.Parse(args[2]);   // ID of a work item, for example: 12

                // Create a connection
                VssConnection connection = new VssConnection(orgUrl, new VssBasicCredential(string.Empty, personalAccessToken));

                // Show details a work item
                ShowWorkItemDetails(connection, workItemId).Wait();
            }
            else
            {
                Console.WriteLine("Usage: ConsoleApp {orgUrl} {personalAccessToken} {workItemId}");
            }

        }

        static private async Task ShowWorkItemDetails(VssConnection connection, int workItemId)
        {
            // Get an instance of the work item tracking client
            WorkItemTrackingHttpClient witClient = connection.GetClient<WorkItemTrackingHttpClient>();

            try
            {
                // Get the specified work item
                WorkItem workitem = await witClient.GetWorkItemAsync(workItemId);

                // Output the work item's field values
                foreach (var field in workitem.Fields)
                {
                    Console.WriteLine("  {0}: {1}", field.Key, field.Value);
                }
            }
            catch (AggregateException aex)
            {
                VssServiceException vssex = aex.InnerException as VssServiceException;
                if (vssex != null)
                {
                    Console.WriteLine(vssex.Message);
                }
            }
        }
    }
}

Request other samples

Not finding a sample that demonstrates something you are trying to do? Let us know by opening an issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].