[英]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.