Wednesday, June 18, 2008

Forcing The Compile Order Of Projects In Visual Studio

For managed code projects, setting project references causes Visual Studio to do the right thing in terms of building dependencies and linking them in the right order. It does the job so well I do not care how it goes about it.

But in the case of Unmanaged Code you will occasionally want to move the outputs around so they can be found by other projects.

To do this right click on the solution in the Solution Explorer, select Properties from the menu.

In the property pages dialog, under Common Properties, select Project Dependencies.

Here you will be able to select a project, then select which projects it Depends on.

Note if the checkbox for a project is grayed out it means a dependency already exists going the other way.

No comments: