Faced a weird problem the other day ,I had changed some references in my project and while compiling I got an error of cannot copy XXXXXX.dll of version 1.0.3 into the output directory since it would overwrite the preexisting assembly ver 1.6.2.
Didn’t know what the exact problem was but knew that the problem could have arisen by the compiler trying to copy the older version assembly in the bin folder containing the new version dll but how could that be possible since I had just 1 reference of the assembly in my project so there was no 2nd reference in the picture at all.
Using the ILDAsm.exe I opened each assembly in the bin folder to gauge where the root of the problem was Thanks to the ILDAsm tool I realized that in one of the helper assemblies there was a reference to the other version of the assembly that was causing the problem. Hence to solve the problem corrected the version of the assembly being referenced and recompiled the project.
Conclusion :- Looking at the tools provided by .Net and using them helped solve the problem faster than it would have normally taken!