如何“添加现有项目” Visual Studio中的整个目录结构? [英] How to "Add Existing Item" an entire directory structure in Visual Studio?

查看:146
本文介绍了如何“添加现有项目” Visual Studio中的整个目录结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得这很荒谬,因为看起来应该这么简单,但是我无法找到这个问题的答案。

I feel ridiculous for asking this because it seems like it should be so simple, however I have been unable to discover an answer to this question.

我有一个与任何C#项目无关的独立文件集,位于复杂的嵌套目录结构中。我想以这种格式将它们添加到我正在处理的ASP.NET Web应用程序中的不同目录中;同时保留相同的结构。所以,我将文件夹复制到我的项目的目标位置,我试图添加现有项目只是为了丢失以前的文件夹层次结构。通常我手动重新创建目录,一对一地复制,然后添加现有项目。在这种情况下,目录/项目太多了。

I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure. I want to add them in that format to a different directory in an ASP.NET web application I am working on; while retaining the same structure. So, I copied the folder into the target location of my project and I tried to "add existing item" only to lose the previous folder hierarchy. Usually I have re-created the directories by hand, copied across on a one-to-one basis, and then added existing items. There are simply too many directories/items in this case.

那么如何在Visual Studio 2008中添加现有目录和文件?

So how do you add existing directories and files in Visual Studio 2008?

推荐答案

将文件/文件夹从Windows资源管理器拖到解决方案资源管理器中。它会将它们全部添加。请注意,如果Visual Studio处于管理员模式,则此操作无效,因为Windows资源管理器是用户模式进程。

Drag the files / folders from Windows Explorer into the Solution Explorer. It will add them all. Note this doesn't work if Visual Studio is in Administrator Mode, because Windows Explorer is a User Mode process.

这篇关于如何“添加现有项目” Visual Studio中的整个目录结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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