tags:

views:

500

answers:

2

I have this Visual Studio solution that includes a project that has a template folder tree consisting of several empty folders. When I add this solution to Team Foundation Server (TFS) using the "Source Control -> Add Solution to Source Control" menu item it doesn't add the empty folders to the TFS repository! I really need those folder to be present when the code is downloaded from TFS.

Now, I know I can create the folder structure using Source Control Explorer, but since the whole project is managed from within Visual Studio it feels kinda wrong to create these folders in a separate way.

Is there some setting I need to adjust so Visual Studio will also create TFS folders for empty project folders?

+1  A: 

Apparently it's a feature, not a bug:

"in the Add files to source control we do not support the addition of empty folders, but in our research our users preferred the SCE toolbar button for actually creating their empty tree structure rather than going to the file system, doing it there and then adding to source control."

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=119974

In TFS2008 you can drag and drop folders from Windows Explorer into source control explorer, and empty subfolders will be created when checking in. Not sure if this works in TFS2005, I don't have an instance handy to test it - anyone?

Ian Nelson
LMAO. I'd like to meet these "users." If only so I can club them on the head...
Ben Scheirman
So, for a large folder tree I have to press the "Create Folder" button many times? I tried to use "tf add myfolder /recursive" from the command-line, but it added only the first two levels of the folder structure. Why?
LeonZandman
You can drag and drop folders from Windows Explorer into source control explorer, and empty subfolders will be created when checking in.
Ian Nelson
Drag and drop doesn't work on my system! If I drag/drop folders nothing happens. If I drag/drop a normal file it is opened by Visual Studio instead of being added to the repository.
LeonZandman
@Stingray - try installing the TFS October 2008 Power Tools, specifically the Windows Shell Extension. http://msdn.microsoft.com/en-us/teamsystem/bb980963.aspx Hope this helps!
Ian Nelson
@Ian - I installed the Power Tools, but drag/drop still doesn't work. Also the Windows Shell Extension is unable to connect to the TFS server as someone already reported to Microsoft (https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=417956).
LeonZandman
A: 

Drag and Drop folders worked for me on TFS 2008. It doesnt work on TFS 2005. Thanks!