-2

I understand how this issue is occuring, and I'm confident it's another dll, that needs an older version of 'Microsoft.ReportViewer.WebForms', and I'm guessing the 'Microsoft.ReportViewer.Common' as well.

Before this is marked as a duplicate, answers to this type of question just say to find the offending dll and "dealing with it".

What exactly do I do to allow the offending dll to use the old assembly, while keeping the existing one in my project?

The exact error was:

Could not load file or assembly 'Microsoft.ReportViewer.WebForms,
Version=8.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' 
or one of its dependencies. 
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
3

1 Answer 1

1

You can't use 2 versions of the same DLL in a project. It's possible that you are referencing version A of the DLL directly in your project, but that another reference itself makes reference to version B of the DLL. In that case, you have no choice but to either remove the reference with the reference (nested reference), or bring in the version that the nested reference wants to use and use it.

One thing that I find helps in general is that for the properties of my project references, I set "Specific Version" to true. This will help alleviate the application going to the GAC and getting a newer version of the DLL than you want it to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.