C++ Visual Studio File Layout
Posted: Sat Mar 20, 2010 8:23 pm
As any VS user knows, the projects folders really are only 'filters'. This is fine, except there's no way to make them act like how I want it to on the hard drive unless its manually done. What I mean is that I can add folders under "source files" and add an item there, but on the hard drives its all under one big folder, same as the includes. Now, I can of course put said file anywhere I want relative to the project, so in the solution explorer, I can have
Header Files
-- Graphics
---- drawsprite.h
Source Files
-- Graphics
---- drawsprite.cpp
And on the Hard drive I can make it like
$(ProjectDir)/inc/graphics/drawsprite.h
$(ProjectDir)/src/graphics/drawsprite.cpp
That's all fine, if a tad annoying. However, say I want to move drawsprite.cpp/.h to
$(ProjectDir)/src/graphics/sprite/drawsprite.h
$(ProjectDir)/src/graphics/sprite/drawsprite.cpp
It's my belief that the filters should reflect the folder layout because of includes. #include "graphics/sprite/drawsprite.h" is alot better then simply #include "drawsprite.h". To keep this layout intact, I first have to remove the files from the project, create said folders, move files, create said filters, then re-add the items to the filter, and finally fit any c++ includes. It's like it's intentionally a pain. Why can't we just map filters to a folder and be done with it? Yes, I realise there's a "Show All Files" view, but how many people use it? It also shows alot of "crap" I don't want to see. There seems to be no way to make a project remember to set to "view all files" on startup. Is there some addon or option that lets me add, move, and delete files/folder in the filter view while doing the same to the hard drive?
edit:
In the help files, I find this...
Header Files
-- Graphics
---- drawsprite.h
Source Files
-- Graphics
---- drawsprite.cpp
And on the Hard drive I can make it like
$(ProjectDir)/inc/graphics/drawsprite.h
$(ProjectDir)/src/graphics/drawsprite.cpp
That's all fine, if a tad annoying. However, say I want to move drawsprite.cpp/.h to
$(ProjectDir)/src/graphics/sprite/drawsprite.h
$(ProjectDir)/src/graphics/sprite/drawsprite.cpp
It's my belief that the filters should reflect the folder layout because of includes. #include "graphics/sprite/drawsprite.h" is alot better then simply #include "drawsprite.h". To keep this layout intact, I first have to remove the files from the project, create said folders, move files, create said filters, then re-add the items to the filter, and finally fit any c++ includes. It's like it's intentionally a pain. Why can't we just map filters to a folder and be done with it? Yes, I realise there's a "Show All Files" view, but how many people use it? It also shows alot of "crap" I don't want to see. There seems to be no way to make a project remember to set to "view all files" on startup. Is there some addon or option that lets me add, move, and delete files/folder in the filter view while doing the same to the hard drive?
edit:
In the help files, I find this...
Well.... Can't you do that automatically? bleh!Note:
Solution Folders are an organizational tool in Solution Explorer; corresponding Windows folders are not created. We recommend that you organize your projects on disk in the same way that you organize them in the solution.