4

I have a Visual Studio 2013 project within a folder called 'Source', let's say. I'd like to have some additional folders within that folder and I'm trying to find a way to do that. If I, in visual studio, create a new 'filter' (which looks like a folder) and create a file within it. It might appear to be within a new folder (as displayed by Visual Studio), but it actually is in the default Source folder.

I try a second approach and create the folder with the help of the operating system. I even create a file within it manually. Then I go to visual studio and add an existing item, selecting the file WITHIN the folder. Visual studio then adds the file, which is good, but its displayed as being in the default directory.

I suppose there is a very manual way. And thats mirroring everything. Creating a folder using the operating system. Creating a filter within visual studio, etc. And mirroring everything manually.

Is there a different way or do I create a better IDE in 2 days?

user1594138
  • 1,003
  • 3
  • 11
  • 20

1 Answers1

6

Simple Drag and Drop should work.

  1. Keep your directory with source inside your project directory.
  2. Drag and Drop directory structure from windows explorer to visual studio existing project.
  3. Click "Show All Files" option in the top of Solution Explorer toolbox

After doing this you need to add this directories in your project.

  1. Select that directory, right click and select "Include in project"

You are good to go!

Details here

Community
  • 1
  • 1
Digital_Reality
  • 4,488
  • 1
  • 29
  • 31
  • Thanks. Clicking on "Show All Files" and then "Include in project" did it. Good thing I'm not about to waste my time creating an IDE for now. Interesting how the "New Folder" option pops up when "Show All Files" is on, otherwise its "New Filter". Dumb design in my opinion, but I'll go with it for now. – user1594138 Jan 08 '14 at 16:55
  • @user1594138 Its not dump option overall. 95% of times you will simply add one file or one class or one resource. So it make sense to show "add folder" option when you are in show all files mode. – Digital_Reality Jan 08 '14 at 17:02
  • 2
    I mean that the behavior of the IDE was cryptic and I couldn't figure out how it worked without asking online. It did not help that the "Show All Files" button's text is very cryptic given what it does, in my opinion. And looking at the post you linked, it seems I'm not the only one that doesn't exactly understand this "IDE". – user1594138 Jan 08 '14 at 17:10
  • And now I'm trying to use a standard #include "file.h" unable to get it to work with either the hidden files directory structure or the show all files directory structure and for some magical reason intelliSense doesn't even pop up at all right now to let me browse to it. Not exactly a software of any quality metric, far below it. Alright I'm switching to a simple notepad++ and then I'll create a very simple IDE later. – user1594138 Jan 08 '14 at 17:22
  • The VS IDE as many other IDEs are pretty substantial pieces of software, evolved over a long time, for which you sometimes need to read some documentation on how to use it properly. In the above example, "file.h" is not specified with its full path. Afaik, the IDE doesn't look for it in the included files in the project, as it could be included multiple times, which one should it choose (and other issues).. It looks in the include folders you specify in the compiler options for the project in the order you specify them, similar to how the compiler would. – Emile Vrijdags Jun 08 '15 at 18:00