Share via


How to set filters to be real folders on the hard drive for a Visual C++ project

Question

Tuesday, March 2, 2010 9:47 PM | 1 vote

When I create filters in my solution in Visual Studio 2010 Ultimate RC, they don't match folders on the HD. Is there any way to set VS up so that they match? I don't want to have to organize my code by hand, AND in VS.

All replies (5)

Sunday, May 23, 2010 2:01 PM âś…Answered | 2 votes

I was looking for that same thing and it lead me here.

 

In case you haven't found the solution, although I'm on vc++ 2008

in the "solution explorer" at the top, select "Show All files"

that will show you the project directory structure where you can view and add new folders.

 


Wednesday, March 3, 2010 7:52 AM

Hello,

Could you please offer more detailed information about 'When I create filters in my solution in Visual Studio 2010 Ultimate RC, they don't match folders on the HD' so the community members could help you better and quicker? What does here filter mean?

Thanks.Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Send us any feedback you have about the help from MSFT at [email protected].


Wednesday, March 3, 2010 2:36 PM

The file organizers in the solution. Right click -> Add -> Filter. They act just like folders, but because they don't actually match folders on the hard drive, you can't have two files named the same in two filters, which is rather counterintuitive.

http://yfrog.com/jofiltersj

Essentially, you'd have to organize your solution twice - once in Visual Studio, and once on the hard drive by hand. It's even more unintuitive because the #include statement takes a real filepath. So a file that appears to be in "C++/Common/global.h" for example, is actually just included as "global.h".

In essence, the filters actually serve no useful purpose because they have no effect on the hard drive's storage or the in-code references.


Thursday, March 4, 2010 6:40 AM

Hello,

As I know, we are not able to do that as it is by design and folder would be the adaptive choice.

In addition, you may post your issue on the Visual C++ General Forum to see if any community members have came across this kind of issue and could offer any suggestions.

Thanks. Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Send us any feedback you have about the help from MSFT at [email protected].


Sunday, May 23, 2010 3:19 PM

You are my God. Thanks!