简体   繁体   中英

Is there a way to list all TFS-workitems associated to change sets? Artifact class missing

I wrote a small program based on this article: https://blogs.msdn.microsoft.com/narend/2006/08/07/programmatically-getting-workitems-associated-with-given-changsets-inverese-queries/

Now I have a machine where I have on VS-2019 installed. Rebuilding my project doesn't work because there are is a missing class Artifact in the code.

I just added the previous assemblies Microsoft.Teamfoundation.Client, Microsoft.Teamfoundation.Common, Microsoft.Teamfoundation.VersionControl.Client.

Or is there another way to list the workitems associated with the change sets?

You must add the reference to the assembly it is defined in. According to MS previous versions doc it is in the assembly Microsoft.TeamFoundation.Common.dll

I have located Artifact class in assembly Microsoft.TeamFoundation.Common.dll in C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\ReferenceAssemblies\\v2.0\\Microsoft.TeamFoundation.Common.dll AKA VS2012 folder. Between 2012 and 2017 MS did remove it from that assembly.

Assuming your TFS is 2015, you can get it using this NUGET package :

Integrate with Team Foundation Server 2015 and Visual Studio Team Services from desktop-based, ASP.NET, and other Windows applications. Provides access to version control, work item tracking, build, and more via public REST APIs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM