简体   繁体   English

Visual Studio 2010问题-解决方案和源代码管理资源管理器不匹配-将项目添加到子文件夹仍然映射到根目录

[英]Visual Studio 2010 Issue - Solution & Source Control explorer mismatch - Adding projects to sub-folder still maps to root

While adding a class library to a sub-folder in VS 2010...the default folder structure populated in the wizard still point to the parent. 在VS 2010中将类库添加到子文件夹时,向导中填充的默认文件夹结构仍指向父文件夹。

̶S̶o̶,̶ ̶i̶n̶ ̶S̶o̶l̶u̶t̶i̶o̶n̶ ̶E̶x̶p̶l̶o̶r̶e̶r̶ ̶t̶h̶e̶ ̶a̶d̶d̶e̶d̶ ̶f̶o̶l̶d̶e̶r̶ ̶a̶p̶p̶e̶a̶r̶s̶ ̶i̶n̶ ̶t̶h̶e̶ ̶r̶o̶o̶t̶.̶ ̶S̶o̶,̶̶i̶n̶̶S̶o̶l̶u̶t̶i̶o̶n̶̶E̶x̶p̶l̶o̶r̶e̶r̶e̶r̶e̶r̶e̶r̶e̶r̶s̶

EDIT: In Solution Explorer it is fine...and it appears exactly under the folder I added it to. 编辑:在解决方案资源管理器中很好...并且它完全出现在我将其添加到的文件夹下。 But in Source Control explorer it appears in the root...because the wizard by default points it there. 但是在源代码管理资源管理器中,它显示在根目录中...因为默认情况下该向导将其指向根目录。 Unless I am careful enoughto change it at that stage ...the library is added to the root. 除非在此阶段我足够小心地更改它,否则...库将添加到根目录中。

Is there a setting to resolve this issue? 是否有解决此问题的设置?

Solution explorer's folders are virtual folders. 解决方案资源管理器的文件夹是虚拟文件夹。 That is, they do not relate to folders on the disk. 也就是说,它们与磁盘上的文件夹无关。 I'm thinking you created a folder in VS and then right mouse clicked on it to add a new project. 我以为您在VS中创建了一个文件夹,然后右键单击它以添加一个新项目。 If so, what your seeing is correct (intended) behaviour. 如果是这样,您所看到的是正确的(预期的)行为。

To do what you want to do, in the "Add New Project" form click on the "Browse" button at the bottom next to "Location". 要执行您想要的操作,请在“添加新项目”表单中,单击“位置”旁边底部的“浏览”按钮。 Browse to the folder you want to put the project in (it will create another child folder here). 浏览到要放入项目的文件夹(它将在此处创建另一个子文件夹)。 Once you do this the project will appear in the root of the solution in VS. 完成此操作后,该项目将出现在VS解决方案的根目录中。 Now drag it to the solution folder you want to use. 现在将其拖到您要使用的解决方案文件夹中。

Note: I think you might have trouble with a creating a solution folder of the same name as a real disk folder. 注意:我认为您可能无法创建与真实磁盘文件夹同名的解决方案文件夹。 Not sure. 不确定。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 解决方案资源管理器未在解决方案中显示项目 - Visual Studio Solution Explorer not showing projects in solution 在解决方案资源管理器下的 Visual Studio 解决方案中创建的文件夹未出现在源代码管理资源管理器中 - Folders created in visual studio solution under solution explorer not appearing in source control explorer Visual Studio 2010插件 - 将上下文菜单添加到解决方案资源管理器中 - Visual Studio 2010 Plug-in - Adding a context-menu to the Solution Explorer 在 Visual Studio 2010 中将项目添加到项目 - Adding projects to a project in Visual Studio 2010 Visual Studio 2012:项目和解决方案资源管理器所需的帮助 - visual studio 2012: Help needed with projects and solution explorer 无法访问Visual Studio 2010解决方案资源管理器中的文件夹 - Cannot access folders in Visual Studio 2010 Solution Explorer Visual Studio 2010:如何在解决方案中强制执行项目的构建顺序? - Visual Studio 2010: How to enforce build order of projects in a solution? 在Visual Studio 2010的解决方案资源管理器中禁用添加引用 - Disabled Add Reference in Solution Explorer on Visual Studio 2010 在1个解决方案中的多个项目之间共享资源。 Visual Studio 2010 - Share Resources Across Multiple Projects In 1 Solution. Visual Studio 2010 重命名大型解决方案中的项目后,Visual Studio 2010挂起 - Visual Studio 2010 hangs after renaming projects in large solution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM