Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding references adds wrong version

When adding a reference to VS 2008, the version is listed as v1.0.0.0 when it should be v1.1.0.0 - as far as I can see there is absolutely no reason why it is adding the wrong version.

Both projects are written from scratch, no other refs reference the assembly I'm trying to add and when I look at the file in windows, it has the correct version, yet somehow VS still picks up the wrong one (the target path is correct).

Does anyone know how to get VS to choose the version that I'm pointing it to, and not some older version it decides (for no reason at all) is the correct one?

I asked this question before, but there were no answers that solved the problem...

I AM DEFINITELY PICKING THE CORRECT FILE.

like image 404
Mr Shoubs Avatar asked Oct 04 '10 14:10

Mr Shoubs


2 Answers

I was having the same issue and discovered that I had a reference path set (from the Reference Paths button on the References tab of the Project properties). This meant that as I added the assemblies, it was trying to find them in the reference path first, rather than the directory I selected them from.

I removed the reference path and was able to add the files correctly.

like image 102
X-Cubed Avatar answered Sep 25 '22 01:09

X-Cubed


I solved this issue by going into the project I'm trying to reference, REMOVING ALL references (e.g. system, system.core, system.data etc) and adding them all back in. This solved the problem.

I can't explain why this is the solution, especially as this project didn't have any other references in other than what you get by default.

like image 38
Mr Shoubs Avatar answered Sep 25 '22 01:09

Mr Shoubs