The trick is to use an "hidden" drop down menu in the "Add Existing Item" dialog.
You can see the effect because file added as link contains a special symbol (arrow) in the bottom left.
If you define macro in one of the project this technique allow you to share a file and customise it a little bit without the need to maintain two completely separate files. This is surely not a best practice but could be useful in some situations.
Visual Studio is clever enough to show you the code in grey based on where you open the file.
Great solution !
ReplyDelete