Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I be worried about Version Conflicts?

I recently updated my devArt dotConnect for Oracle components from version 6.? to 7.2

All seems to work fine.

However, on compiling I see I've got the warning: "Found conflicts between different versions of the same dependent assembly."

I don't know if this is related to the dotConnect components (it doesn't say), but I reckon that's a pretty good guess.

When I 2-click the warning, I get the dialog:

MS Visual Studio -- One or more dependent assemblies have version conflicts.

Do you want to fix these conflicts by adding binding redirect records in the app.config file?

How nice of them (MS) or it (VS) to offer, but...what will it do? It doesn't really tell me exactly. Should I stay or should I go?

UPDATE

I have a reference to two DevArt dotConnect for Oracle components:

Devart.Data -and Devart.Data.Oracle

Devart.Data: Runtime Version v2.0.50727, Version 5.0.555.0

Devart.Data.Oracle: Runtime Version v2.0.50727, Version 7.2.96.0

So there is a Version, but not a Runtime Version, mismatch. I don't know if this is the problem. It would be nice if the warning message were more explicit. Presumably "it" knows exactly what the problem is - why won't it divulage that vital info?

UPDATE 2

I have another project that uses the exact same two references. It wouldn't even compile after installing the updated components. Why the difference between the two projects that way? So even though the .DLLs were the same (same name, same location on disk), I removed them and then added them back to the second project, and it ran fine - no errors, no warnings. BUT, I went back to the first project and, still getting the same warning, I removed and added back those two references/DLLs -- and I still get the same warning. So I still don't know what to do/whether I should take VS up on its offer/suggestion to redirect (I picture in my mind the "old school" telephone operators reconnecting wires every which way, doing gyrations worthy of teenage Twister aficianados).

like image 335
B. Clay Shannon-B. Crow Raven Avatar asked Oct 06 '22 10:10

B. Clay Shannon-B. Crow Raven


1 Answers

The binding records will add binding sections to your web.config (or app.config) file pointing a given version of the dll to another one. This might be dangerous however if they're not compatible between each other. They look like

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
      <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>

I'd however before go and check from where the different projects link your Devart dlls and make sure they all reference the same. In the extreme case, copy the Devart dlls you'd like to use in a folder of your solution and make all of your projects point to that one

like image 98
Juri Avatar answered Oct 09 '22 00:10

Juri