How does VS 2003 pick the correct dll's to link to while compiling?
I have the following directories -
>>dir | grep -i "nunit"
06/16/2006 11:05 AM <DIR> NUnit 2.2.8 //built with 1.1 framework
06/16/2006 11:06 AM <DIR> Nunit-Net-2.0 2.2.8 //built with 2.0 framework
My GAC for Nunit looks as follows -
>>gacutil /l | grep "nunit"
nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
Whenever I do a fresh checkout of an .NET 1.1 application, all the
references to nunit.framework.dll point to the "Nunit-Net-2.0 2.2.8"
folder even though the references were created by pointing to the
"NUnit 2.2.8", i.e., the properties window for the nunit.framework
reference shows the full path of "Nunit-Net-2.0 2.2.8" folder. Hence,
projects that have refernce to the nunit.framework fail to compile.
I know that VS 2003 uses <HintPath> element in the .csproj file, and
<ReferencePath> element in the .csproj.user file to resolve the references. The HintPath property retains the correct value, and would resolve to the correct assembly if VS read it. But, it's ignoring it in preference to wherever else it's getting it's value from!
So, I made sure both (HintPath and ReferencePath) elements are empty. Regardless, the same happens
Does anybody know why this happening, and how does VS get this Path property when it is not specified anywhere in my project or settings?
I can only speculate about the fact that it comes from the GAC, which
points to the physical path of one of the nunit.framework.dll files. My
questions are:
Is my understanding correct? I thought that the GAC houses the assemblies, but does it also store the information about location from the where a certain assembly was added (I checked the Codebase property of these assemblies in the GAC, and there is no physical path they point to) ? If not, how does VS even know about "Nunit-Net-2.0 2.2.8" folder ?
- Is there a way for me to retain my references correctly?
- What is order in which VS2003 looks for assemblies to link against. i.e., does it first read the HintPath or ReferencePath. When does it look in the GAC etc.?
I really appreciate any help.

