R – VS2008 Prefers GAC reference to Assemblies in Solution Folder

assembliesgacreferencevisual-studio-2008

I am using some 3rd party libraries in my solution and have saved these in a separate source-controlled folder called 3rdParty. I have added references to the DLLs in this folder from the VS2008 IDE. However, I find that after saving, closing and opening the solution, the references have been changed to point to the assemblies in the GAC.

The reason for using the 3rdParty folder is that I can easily get latest version from any machine and build my project without having to install anything in the GAC folder. How can I get VS2008 to leave my references untouched?

Edit: After seeing Benjol's answer, I have been wondering if I could use an assembly manifest to fix this. Will this help solve my problem?

Best Answer

Even if you could get VS to look in your local folder, that would be no help at runtime (I mean F5/debug runtime), because .Net will look in the GAC first anyway.

And with reference to CopyLocal, AFAIK, that just tells the compiler to copy a version of your referenced DLL into the /bin folder of your project, so there shouldn't be any issues with 'complicated' paths.

Related Topic