Tuesday 4 February 2014

Visual Studio's broken "Project Reference" system

Visual Studio has a supposed project-dependency system, whereby if you add a project in a solution to a dependent project's "References", it should check for changes to the first project when you build or run the second.

It's broken, because it refers to the project by a GUID. Although the reference info is in the vcxproj project file, the GUID is subject to arbitrary change - for example if you put the projects in multiple solutions. And if you put a project reference in one solution, and the referred project isn't in the other, it breaks the build.

There's no good reason for this - so avoid using project references other than for "quick and dirty" builds.

No comments:

Post a Comment