try...catch...finally...bloggg....: The located assembly's manifest definition with name xxx.dll does not match the assembly reference

try...catch...finally...bloggg....

Tuesday, April 12, 2005

The located assembly's manifest definition with name xxx.dll does not match the assembly reference

This error got me solve one of my build problems. Sounds wierd. :-). I have recently adopted log4net for the logging in my webapplication. While doing the testing I used the debug version of the log4net.dll and since it is not strongly named my compiled version of dll had its reference. finally I was satisfied with the logging process and changed the log4net.dll to the release version. I compile the project and I end up with this error message. I do some googling and come across with this nice blog Junfeng Zhang's .Net Framework Notes. I look into the issue and find that my clean build had stopped working (due to my previous nant changes) as I didn't delete the dll from my bin folder. I fix the build process and the whole thing works smooth again. In this process I learnt a major lesson about the dependencies and how things are resolved. While upgrading any of your 3rd party components make sure you just dont do an xcopy deployment hoping the changes will not break anything. Make sure to setup runtime binding redirects. Sample redirects for the nunit framework is attached below
1 <runtime>
2 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
3 <dependentAssembly>
4 <assemblyIdentity name="nunit.framework"
5 publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />
6 <bindingRedirect oldVersion="2.0.6.0" newVersion="2.2.0.0" />
7 <bindingRedirect oldVersion="2.1.4.0" newVersion="2.2.0.0" />
8 </dependentAssembly>
9 </assemblyBinding>
10 </runtime>

0 Comments:

Post a Comment

<< Home


·