Reputation: 44632
Hey folks, I've got an ASP.NET web site project that for some reason is insisting on referencing both mscorlib 1.0.5 and mscorlib 2.0, and I can't figure out why.
I've analyzed all the referenced DLLs using NDepend, and they all appear to only reference mscorlib 2.0. I've got a couple web references, but I can't imagine why that would create an additional reference to the 1.0 dll.
Anyone have any ideas why I'd be getting this additional reference, or what I can use to find out that information? NDepend is great, but just comes back and says "found 2 references, using the newer version", so it doesn't help me figure out why I have the extra reference...
Upvotes: 2
Views: 2408
Reputation: 22857
An errant reference may be residing in your web.config file.
Upvotes: 0
Reputation: 754505
I think at this point your best bet is to use ildasm. Using ildasm on the assembly will bring up a node named "Manifest". Double click on that node and it will dump out the IL representation of assembly references including the referenced version number. Repeat this for all of your DLL's until you find the one referencing the 1.0 version.
EDIT
Another possible solution would be to enumerate the Assembly
values and there associated GetReferencedAssemblies
method. This will return an array of AssemblyName
values which have a corresponding Version member. This should contain the actual version of the referenced assembly vs. the one that was actually loaded.
I'm not 100% sure on this matter and don't have a convenient way to test it right now.
Upvotes: 2
Reputation: 351446
Try removing the reference and recompiling - that will tell you what (if anything) depends on the older version.
Upvotes: 0