This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ' These macros can be used to automatically swap between project and file references when adding/removing projects from a solution. | |
| ' When adding a new project to a solution, all the existing projects (and the new project) are scanned to see if there | |
| ' are existing file references to the project. If so, the file reference will be updated to a project reference. | |
| ' Conversely, when removing a project, if the macro can file a dll on the references path which has the same name as the removed | |
| ' project, it will change the project reference to a file reference. | |
| ' There are a few idiosyncrasies to be aware of: in my environment, all projects build to a common folder, so the macro will set references | |
| ' to 'No Copy', 'Any version', EXCEPT for 'Test' projects | |
| ' (Note that not all project types are supported) | |
| ' This code won't update a project when it is removed (impossible to save a project when it's already 'gone') |