Why do empty folders disappear when adding Visual Studio solution to TFS?

倾然丶 夕夏残阳落幕 提交于 2020-01-04 01:36:08

问题


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:


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?




回答2:


Drag and Drop folders worked for me on TFS 2008, although it didn't on TFS 2005.



来源:https://stackoverflow.com/questions/642695/why-do-empty-folders-disappear-when-adding-visual-studio-solution-to-tfs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!