Reputation: 5019
When I am launching my WPF application, I got the error "Could not load file or assembly 'ASSEMBLY_NAME, Version=0.4010.4609.26378, Culture=neutral, PublicKeyToken='XXX' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)".
The ASSEMBLY_NAME is the name of one project, which is referenced by many other projects because it is a core. My WPF project is also referencing it, and some projects referencing ASSEMBLY_NAME are references of my WPF project. However, both WPF project and its references which are referencing ASSEMBLY_NAME, they all reference the version 0.4010.4610.xxxx. So even though I understand why this error happens--it's because an older version is the target however I only have newer version, I can't find out which project or part is referencing the version 0.4010.4609.xxxx. As I mentioned, the startup project, my WPF project is not. Could anyone tell me how to check who is referencing it? Thanks.
Upvotes: 1
Views: 4448
Reputation: 174457
You can check the properties of each reference to ASSEMBLY_NAME and verify that the path you see is something like ASSEMBLY_NAME\bin\Debug
and not PROJECT_CONTAINING_THE_REFERENCE\bin\Debug
.
Alternatively you can delete all your bin
and obj
folders in the projects and do a Rebuild All. One of your projects should fail building. That's the one with the wrong reference.
Upvotes: 2