Add a new filter in C # projects

In C ++ projects in Visual Studio 2008, you can Add โ†’ A new filter that will be useful if you want to separate some files from others (that is, source files from header files) and save each type in "half-loops" without moving them physically to the hard drive. I wanted to do the same in C # projects, say, xml files, but the only option here is to create a folder physically, which I want to avoid. And there are my questions:

  • Is it possible (and how) to create filters in C # projects?
  • Why are the C # and C ++ parameters of the Add project different from each other (first you can add a folder (not a filter) to a second filter (not a folder)?

ps. I am using VS2008 and I do not know if this has changed in VS2010.

+3
source share
3 answers

As far as I know, it is impossible to create filters for use in C # projects. C # projects are organized using actual folders on your hard drive. I'm sorry. As for why C # and C ++ have different options, it's just because they are different languages. C # is a higher-level language, and then C ++, so (I just guess) they went with folders to make it more noticeable what was going on in the project.

+5
source

In C #, you can group files together:

alt text

To do this, you will need to install the free extension VSCommands 2010 or VSCommands 2008

+1
source

sad: No "Filters" - in MSBUILDthat use C # projects.

A possible workaround is to have a real folder containing symbolic links to the files you want to group.

0
source

Source: https://habr.com/ru/post/1763756/


All Articles