One last little interesting piece of information on how Visual Studio uses MSBuild relates to the loading of project files. Each project file loaded shares the same MSBuild Engine object within Visual Studio. In addition, when we find a project-to-project reference within a project file we do our best to use an existing Project object. If the project has already been loaded, it would be pretty silly to go through all the work to create another object for the exact same item!
The one place where we’re careful is if a project is getting loaded with different global properties. If they’re not an exact match for the existing properties on a Project object, we won’t re-use it.
This little nugget brings to a close our series on MSBuild in Visual Studio. I hope you enjoyed it, we had fun sharing all the information with you!
[ Author: Neil Enns ]