Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>Basically, I want one of my folders to appear above the other folders as a type of "special folder", similar to how Properties has it's own special place even though it's a folder, same with App_Data, etc.</p> <p>Is this possible?</p> </blockquote> <p>Yes:</p> <ol> <li>Do it manually through the IDE</li> <li>Write your own script to generate/modify your <code>*.sln</code>/<code>*.vcproj</code></li> </ol> <p>For (1) "manual" on solutions in the IDE: <code>Solution Explorer</code>, <code>right-click</code> on <code>Solution node</code>==><code>Add</code>==><code>New Solution Folder</code>.</p> <p>While typically the folders are sorted alphabetically (I'd insert a leading underscore to force your special folder to the top), solution folders inserted manually on my MSVS2008 leave the new folder "at the top", even though it should have bumped down when alphabetically sorted. However, folders under a <code>Project</code> (which are called "<code>Filters</code>") are always sorted alphabetically, and added similarly from the right-click, and then you can modify their "filter properties" with file name globs for what you want in there (e.g., add a filter glob for "<code>*.MY_EXTENSION1;*.MY_EXTENSION2</code>").</p> <p>We chose (2), and we generate our own <code>*.sln</code> and <code>*.vcproj</code>, adding our own folders/filters. I've not seen any utilities on the web to help with that (so we had to write our own). The formats are not too hard to reverse engineer, but it's largely undocumented XML, so you have to experiment. There are only a couple good web articles explaining what's in the file, like this one:</p> <p><a href="http://tim.oreilly.com/pub/a/dotnet/excerpt/vshacks_chap1/index.html?page=4" rel="nofollow">http://tim.oreilly.com/pub/a/dotnet/excerpt/vshacks_chap1/index.html?page=4</a></p> <p>On the "bright side", the files are only XML, so in developing our scripts we merely made changes through the IDE, saved, and compared the "diffs" for what change we want. Those changes are what our scripts insert when we modify our files. So, if you modify the file manually, you can similarly just "<code>diff</code>" the file to see what changed, and make your own script. (IMHO, this is the fastest and easiest route, since tools generally do not exist to manipulate these files.)</p> <p>Tools like <code>CMake</code> and <code>QMake</code> generate <code>*.vcproj</code>/<code>*.sln</code>, but don't really do the folder customization thing like you're talking. However, we look at their output too, because, "there's more than one way to do things" in these files, and the files seem to have many undocumented features for doing different clever things that somehow these tools have "discovered" (so you can try to copy their generated output).</p> <p>We found the .NET APIs to work with these files as too much work, and not really designed for that type of manipulation, but YMMV.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload