Search code examples
enterprise-librarytfsbuild

Microsoft.Practices and TFS Build


This might not be a Microsft.Practices specific question (probably not but not 100% sure) but it only seems to be happening with this (Enterprises Library and Unity).

Basically, we have customized versions of the EntLib (and uncustomized version of Unity) that we have in a binary references location. We also have some in-house shared binaries in the same location.

When I build via TFS all of the in-house libraries copy from the shared location but the EntLib and Unity dlls copy from the installed location on the server (instead of the shared location). I have verified that the EntLib dlls are in the correct shared location.

Any ideas as to why this is happening?

Update:

After looking further it appears that if a dll was not modified then it is pulling the GAC version, regardless of where the reference points. this means if I have hell.dll in the GAC and a reference to c:\hell.dll it will take the GAC version unless the c:\dll.hell has changed. Can anyone confirm this is the bahavior that I am seeing?


Solution

  • Your discovery about pulling from the GAC is correct. Standard .NET probing will ALWAYS pull something from the GAC if the StrongName matches (Name, Version, Public Key Token) regardless of where the reference points. I'd say that it's a best practice to keep things you may be building or referencing during a build and want full control over out of the GAC on Dev/Build machines.