Coder Social home page Coder Social logo

azure-devops-wit-client-om-migration-guide's Introduction

This guide is to help you migrate your .NET code from using WIT Client OM to our REST based .Net Client Libraries. Below is table of the common work item tracking scenerios with links back to its respected API documentation.

Common Scenarios

Scenario WIT Client OM REST based
Get list of work items WorkItemStore.Query Work Items - List
Get single work item WorkItemStore.GetWorkItem Work Items - Get Work Item
Create new work item WorkItem Work Items - Create
Update existing work item WorkItem.Fields Work Items - Update - Update a field
Validate a work item WorkItem.IsValid(),
WorkItem.Validate()
Work Items - Update - Validate only
Create a link to an existing work item WorkItem.WorkItemLinks.Add Work Item - Update - Add a link
Add a comment WorkItem.History Work Item - Update - Update a field
Create a hyperlink WorkItem.Links.Add() Work Item - Update - Add a hyperlink
Add an attachment WorkItem.Attachments.Add() Work Item - Update - Add an attachment
Query work items using WIQL WorkItemStore.Query() Wiql - Query by Wiql
Run an existing query to get a list of work items WorkItemStore.Query() Wiql - Query by Id
Get list of work item types for your project Category.WorkItemTypes Work Item Types - List
Get work item type details Category.WorkItemTypes Work Item Types - Get
Get list of fields for a work item type WorkItemType.FieldDefinitions Work Item Types Field - List
Get field details WorkItemType.FieldDefinitions Work Item Types Field - Get

Resources

Support

Looking for a help on a scenerio that we missed? If so, please create an new issue and we will add the scenerio directly into the repo.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-devops-wit-client-om-migration-guide's People

Contributors

danhellem avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar steveculver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

azure-devops-wit-client-om-migration-guide's Issues

WorkItemStore and Project is deprecated

Hi,

I have an vsix project that extends visual studio 2019, I have used the following method to find the projects in DevOps:

TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri(Properties.Settings.Default.DevOpsUrl));
WorkItemStore workItemStore = tpc.GetService();
foreach (Project teamProject in workItemStore.Projects)
{
....
}

I am trying to use the preferred method
VssConnection connection = new VssConnection(new Uri(Properties.Settings.Default.DevOpsUrl), new VssClientCredentials());
ProjectHttpClient projectClient = connection.GetClient();
IPagedList projects = await projectClient.GetProjects().ConfigureAwait(true);

I have tried many variants with or withour await, but all fails on the same error. If I create a standalone exe and use the same nuget package Microsoft.TeamFoundationServer.ExtendedClient it will work, but if I call it from my VS plugin it will fail with the following, I have no clue and has been trying to find a solution for days now, any help is appreciated.

System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'System.Threading.Tasks.Task1<Microsoft.VisualStudio.Services.WebApi.IPagedList1<Microsoft.TeamFoundation.Core.WebApi.TeamProjectReference>> Microsoft.TeamFoundation.Core.WebApi.ProjectHttpClient.GetProjects(System.Nullable1<Microsoft.TeamFoundation.Core.WebApi.ProjectState>, System.Nullable1, System.Nullable1<Int32>, System.Object, System.String, System.Nullable1)'

how to get team info?

I tried to use this method GetTeamMembersAsync of TeamHttpClient, but got warning that it has been deprecated.
Would like to check if there is corresponded function in RESTClient libraries?

Thanks!

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.