I have an issue with a project finding multiple versions of the same assembly. System.Web.Mvc
for example:
I want to make sure that our MVC projects will never find such an outdated dll
from anywhere except out NuGet sources.
I realize it's not a good idea to go about removing the conflicting versions from system since a lot of applications may be depending on them. For example, this one was found in C:\Program Files (x86)
Update:
Since we use NuGet, I changed the:
Project > Properties > Build > Output > Output path:
to C:\Temp\Drop
in every project (we have some portable area class library projects aswell) and then
Project > Properties > Reference Paths
and added C:\Temp\Drop
And the problem went away.
Would this be the correct way of going about it or am I just opening another can on worms here?
Check the following article related to assembly binding and probing, it's quite good:
MSDN - Assembly Probing
Check this Article too.
There's a complete hierarchy which is used to find an assembly, for strongly named assemblies GAC would be the first place, in your case you are using strongly named assembly. As explained in the article you should be able to direct your application to the correct assembly version at the runtime