I have next situation and I am stack.
I am using Microsoft.TeamFoundation classes to get workitems from stored query with c#. I know server name, project name and stored query name. So I can execute stored query and receive all WorkItems.
But than I have to create a direct link to this item. According to the documentation, this link should be like
http:// ServerName:8080/tfs/CollectionName/ProjectName/_workitems/edit/Id
So, before executing query I know ServerName, ProjectName and work item's Id. But I cant find ProjectName anywhere.
So my question is. How, knowing ServerName, ProjectName, WorkItemId and Stored Query name get CollectionName?
Or. How to create link to the work item knowing ItemsId?
P.S. GetArtifactUrl is not the right way.
Thanks for help!