将Visual Studio解决方案添加到TFS时,为什么空文件夹会消失? [英] Why do empty folders disappear when adding Visual Studio solution to TFS?

查看:132
本文介绍了将Visual Studio解决方案添加到TFS时,为什么空文件夹会消失?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个Visual Studio解决方案,其中包括一个项目,该项目的模板文件夹树由几个空文件夹组成。当我使用源代码管理->向源代码管理添加解决方案菜单项将此解决方案添加到Team Foundation Server(TFS)时,它不会将空文件夹添加到TFS存储库中!从TFS下载代码时,我真的需要那些文件夹。

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.

现在,我知道我可以使用Source Control Explorer创建文件夹结构了,但是由于整个项目是从Visual Studio内管理的,因此以单独的方式创建这些文件夹感觉有些错误。

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.

是否需要调整某些设置,因此Visual Studio也会创建TFS

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

推荐答案

显然这是一个功能,而不是错误:

Apparently it's a feature, not a bug:


在将文件添加到源代码管理中,我们
不支持添加空的
文件夹,但是在我们的研究中,我们的用户
首选
的SCE工具栏按钮实际上是创建其空树
结构,而不是转到
文件系统,在那里执行此操作,然后将
添加到源代码控制中。

"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

在TFS2008中,您可以将文件夹从Windows资源管理器拖放到源代码管理资源管理器中,并且在签入时会创建空的子文件夹。不确定在TFS2005中是否可以使用该子文件夹,我没有方便的实例来进行测试-任何人?

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?

这篇关于将Visual Studio解决方案添加到TFS时,为什么空文件夹会消失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆