We have an old C / C ++. Dll registered in COM. Our clients have both their own and .NET clients that use this .dll.
We created a new .NET.dll to replace the old one, i.e. their COM interface is identical. We would like to replace the old .dll without requiring our clients to recompile or take any action to their clients.
For native clients, it works just fine to simply unregister the old .dll and register the new one (with regasm). It also works for some .NET clients. However, in these cases, the client and the new .dll are compiled with the same version of .NET, which makes an exception below.
In other words, this works:
.dll is .NET 3.5 -> client is .NET 4.0 .dll is .NET 4.0 -> client is .NET 3.5 .dll is any .NET -> Client is native
This produces the action below:
.dll is .NET 4.0 -> client is .NET 4.0 .dll is .NET 3.5 -> client is .NET 3.5
[A] BARAPIXLib.barcom5 cannot be added to [B] BARAPIXLib.barcom5.
Type A is taken from "BARAPIXLib, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null" in the context of "LoadFrom" at location C: \ arkiv \ S_BTW \ BTW \ BARAPIXWebService \ Barapix \ bin \ BARAPIXLib.dll.
Type B starts with "BartrackTest, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null" in the "Default" context in the location "C: \ arkiv \ Bartrack \ BartrackTest \ x86 \ Src \ BartrackTest \ bin \ x86 \ Release \ BartrackTest.exe "."}
Any ideas would be appreciated.
Poppert
source share