开发者

Add New Filter functionality in C# projects

开发者 https://www.devze.com 2023-01-15 11:43 出处:网络
In C++ projects in Visual Studio 2008 there is possibility to Add -> New filter which will be usefull if one wants to separate some files from others (ie. source files from header files) and keep each

In C++ projects in Visual Studio 2008 there is possibility to Add -> New filter which will be usefull if one wants to separate some files from others (ie. source files from header files) and keep each type in "semifolders" without moving them physically on the hard disk. I wanted to do the same in c# projects with, lets say xml files, but the only option here is to create folder physically, which I want to avoid. And there are my questions:

  1. Is it possible (and how) to create filters in C# projects?
  2. Why C# and C++ project's开发者_开发问答 Add options differ from each other (in first you can add folder(not filter) and in second filter(not folder)?

ps. I am using VS2008 and I don't know if this changed in VS2010.


As far as I know it is not possible to create filters for use in C# projects. The projects in C# are organized with the use of actual folders on your hard drive. Sorry. As for why C# and C++ have different options, well that is simply because they are different languages. C# is a more high level language then C++ so (I am only guessing) they went with folders to make it more visible what is going on in the project.


In C# you can group files together:

Add New Filter functionality in C# projects

To do that you will need to install free extension VSCommands 2010 or VSCommands 2008


sadly: No 'Filters' - in MSBUILD that C# Projects use.

Possible work-around is to have a real Folder that contains symbolic links to the handpicked files you seek to group.

0

精彩评论

暂无评论...
验证码 换一张
取 消