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

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

问题描述

我有一组独立的文件,它们根本不隶属于任何 C# 项目,它们驻留在复杂的嵌套目录结构中.

I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure.

我想以这种格式将它们添加到我正在处理的 ASP.NET Web 应用程序的不同目录中;同时保留相同的结构.因此,我将文件夹复制到项目的目标位置,并尝试添加现有项目",结果却丢失了之前的文件夹层次结构.

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天全站免登陆