Question

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).

Was it helpful?

Solution

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

OTHER TIPS

Yes, you should be worried. You have two assemblies (say MyAssembly1 and MyAssembly2) that reference the same assembly (say MySharedAssembly), but at different versions. Only one version MySharedAssembly can be loaded and used your application, and thus MyAssembly1 and MyAssembly2 would need to work correctly with it.

One would have to reference an older version MySharedAssembly. So one question is whether MySharedAssembly is backward compatible? If not, then your application may not work correctly.

If you add the redirect to your config, you are basically saying that any assemblies that try to load the older version of MySharedAssembly should instead use the newer version. So if MySharedAssembly is backward compatible, then you could certainly get away with this. But it would require that your application have a config file.

Your best bet would be to find the assemblies that references the shared assembly and see if there is an update to them that uses the latest and greatest version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top