Creating a Custom query programmatically and displaying results in VS  
Author Message
Lucho1970





PostPosted: Team Foundation Server - Work Item Tracking, Creating a Custom query programmatically and displaying results in VS Top

I want to create a menu item in Visual Studio that will bring up a dialog that will allow users to enter certain parameters, like keywords etc. This should then return a grid/details view in the Visual Studio window. Exactly like running a query from the Team Explorer.

There is an item in the Team menu called "Go to work item..." where you enter the ID. This is basically the same functionality that I am looking for.

I can create a stand-alone app that I can run and query the TFS, and display the results that I want. I just want it as a plug-in to VS.

I have been searching for samples with no luck so far.

Thanks,

Luis



Visual Studio Team System40  
 
 
Naren Datha - MSFT





PostPosted: Team Foundation Server - Work Item Tracking, Creating a Custom query programmatically and displaying results in VS Top

You can create an addin or VSIP package to accomplish this. Check out CreateQuery method on DocumentService in http://blogs.msdn.com/narend/articles/673183.aspx. For brief overview on document service and samples, you can check http://blogs.msdn.com/narend/archive/2006/07/07/AccessingWitFromAddin.aspx . Using createquery, you can create query documents using a WIQL statement that you can generate from user input. You can then show that document in VS shell.