Dependency Hell – Or Compilation-time DLL Hell

For the last couple of months I’ve been working on a project on which the entire Visual Studio solution has 65 projects.

Luckily I’ve been able to work with a smaller solution with only a subset of the projects: The ones that I was working directly with and the ones that I needed for a reason or another.

Unfortunately a couple of weeks ago, the time to start integrating my projects to the main solution arrived and since then I and other team members have been having troubles setting up references between projects.

I ended up detecting that the problems where caused by the references being set by file when for the sake of easy compilation they should been referenced by project.

I then reviewed all the projects setting their reference types to project references and the number of issues fell dramatically.

But occasionally a team member was getting compilation errors during to version number conflicts.

Imagine that project A depends on projects B and C and that B and C depend on different versions of D.

When you try to build the entire solution, although references where set to projects instead of files, Visual Studio 2003 couldn’t compile project A stating that there where conflicting versions of D in the bin folder.

Well, to get the story short, after trying to get rid of the error I searched around and ended up finding an article the explained how to resolve the issue: Error: the dependency ‘file’ in project ‘project’ cannot be copied to the run directory because it would conflict with dependency ‘file’  

 

Published by

Alfred Myers

I have been interested in computers since I got my hands on a magazine about digital electronics back in 1983 and programming them has been paying the bills since 1991. Having focused on Microsoft-centric technology stacks for the best part of two decades, in recent years I’ve been educating myself on open source technologies such as Linux, networking and the open web platform.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: