用于将解决方案文件夹映射到实际文件夹的 Visual Studio 扩展
在之前的问题中,我发现遗憾的是解决方案文件夹并不是目录中的真正文件夹。
我想知道是否有插件或宏可以添加此功能? 即当我创建解决方案文件夹时,它创建了一个真实的文件夹。 当我创建一个新项目(右键单击 => 添加 => 新项目)时,它会自动将它们移动到该文件夹中,删除会导致它从磁盘中删除它(询问后)等。
这是针对 Visual Studio 2005 的,尽管我们可能会在几个月内升级到2008。
In an earlier question, I've found out that sadly Solution Folders are not real folders inside a directory.
I wonder if there is an AddOn or Macro that adds this functionality? i.e. when I create a Solution Folder, it created a real folder. When I Create a new Item (Right Click => Add => New Item) it automatically moves them into that folder, removing causes it to delete it from disk (after asking) etc.
This is for Visual Studio 2005, although we might upgrade to 2008 in a few months.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
截至目前,这在 VS 2005、2008 和 2010 中似乎都是不可能的,并且没有为此提供的 AddIn。
As of now, this doesn't seem to be possible in either VS 2005, 2008 and 2010 and there is no AddIn for this.
我也认为这是一个奇怪的想法。 然而,它可能是一个有用的工具,可以对解决方案中的项目进行逻辑分组,而不必在文件系统中移动文件夹。
I too thought it was a strange idea. However it can be a useful tool to logically group projects in solutions without necessarily moving around folders in the file system.
我怀疑你需要这个作为版本控制工具。 在这种情况下请查看 AnkhSVN。
I suspect you need this for revision control tool. In that case Look at AnkhSVN.
也许您想要的是将文件作为“链接”添加到解决方案文件夹中,即将文件保留在原来的位置,但在解决方案中为它们提供不同的组织。
(当您将现有文件添加到解决方案文件夹或普通项目文件夹时,如果它位于不同的相应物理文件夹中,则会复制该文件)。
它通常不会被注意到,是“添加”中的一个选项。 现有项目...» 对话框,您可以在其中选择“添加为链接”,而不是“添加”。
这允许在项目之间共享文件,或者简单地以不同的方式组织它们。
我经常错过的是出于组织目的在项目中添加“虚拟”文件夹的可能性,而不会破坏命名空间/文件夹最佳实践。
Maybe what you want is to add files to a solution folder as «links», i.e., keeping the files where they are but giving them a different organization inside the solution.
(when you add an existing file to a solution folder or to a normal project folder, if it is in a different corresponding physical folder, the file is copied).
It usually stays unnoticed, an option in the «Add > Existing Item ...» dialog where you can choose "Add As Link", instead of the "Add".
This allows to share files amongst projects, or, simply, organize them differently.
What I oftem miss is the possibility to add "virtual" folders inside a project, for organizational purposes, without breaking the namespace/folder best-practice.
无法真正理解您要添加此功能的意义。
有时你想知道它是否可以做到这一点,但答案可能是否定的。 但这并不一定意味着您无法实现最初的目标,如果没有这个目标,仍然有一些方法可以解决它。
此外,VS 解决方案应该是项目设置的快捷方式,不应包含在任何硬代码中,PC 和 IDE 环境之间的解决方案可能会有所不同。
Can't really get the point you want to add this function.
Sometimes you want to know if it can do this , however, the answer may be no. But it is not necessary means you can't achieve your original goal, there still a few ways to work around it without this.
Additionally, VS solution suppose to be the shortcut of your project settings and should not been included in any hard-code, the solutions may be various between the PCs and IDE envrionment.
我并没有真正使用VS2005,但过去一年一直在使用VS2008。
当您创建新的解决方案/项目时,它有一个用于创建解决方案文件夹的复选框。
如果您随后使用“解决方案资源管理器”窗口,则可以创建和操作其中的文件夹和类文件。 这实际上会创建匹配的新目录。
从解决方案资源管理器中删除文件也会从磁盘中删除实际文件。
I didn't really use VS2005 much, but have been using VS2008 for the past year.
It has a tick box for creating a solution folder when you create a new solution/project.
If you then use the "Solution Explorer" window you can create and manipulate folders and class files within them. This will actually create new directories that match.
Deletion of files from within the Solution Explorer will also delete the actual files from disk.