views:

130

answers:

1

I have an add-in for Visual Studio 2008 (C#), which must select file from a local storage and copy it to becoming folder in Team Explorer. How to copy a file to Documents in Team Explorer?

+1  A: 

The "Documents" node in Team Explorer is backed by a SharePoint site. I haven't looked, but I'd guess the metadata that tells you what the SharePoint site URL is would be in the TFS database. From there you should be able to use SharePoint APIs to publish the document. The only part that might be tricky after that is forcing a refresh of the Documents node so that the published document shows up without having to get the user to hit Refresh in the Team Explorer.

Jeremy Wiebe
O'k, thanks, but how to get the "Documents" node?
Andrej B.
It's a node in the Team Explorer window in Visual Studio. You have to be connected to a team project before you'll be able to see it though.
Jeremy Wiebe