Thursday, December 11, 2008

Located assembly's manifest definition does not match the assembly reference

I wanted to test a fix to a DLL referenced in a Visual Studio 2.0 web application project on Framework 2.0. I created a new DLL (v2.5.6) and copied it into the BIN folder of my web app, but kept a copy of the old DLL (v2.5.1) in place under a different name. I did this in case the fix didn't work, so I could easily revert.

I was surprised that Visual Studio failed, it found the renamed version 2.5.1 and threw a "located assembly's manifest definition does not match the assembly reference" error

Even though My Project, Refernces showed the correct version number for this DLL I tried removing the reference to the DLL and recreating it pointing to v2.5.6. VS threw the same error again

Simple fix was to delete the renamed older version from the BIN directory. DOH! I assumed the new DLL assembly would have a new GUID due to the new version, but apparently not.

Posting this because the most promising reference I found by searching on the error proposed a very technical solution, and this simple fix may help someone else quickly resolve this same type of error.

No comments: