"Version 2.0 is not a compatible version" from VB

We are at the beginning of a long process to upgrade our very large software product from VC++ 6.0 and VB 6.0 to .Net. One of the first projects was a COM module written in VC++ 6.0 and called from various host programs written in VC++ 6.0 or VB 6.0.

The COM object was rewritten as a .Net 3.5 assembly using C#. In order to eliminate the necessity of rewriting all of the hist programs simultaneously, the original COM module was rewritten as a thin wrapper for the .Net assembly suing VC++ 2008.

The COM object, and the .Net assembly it contains, runs correctly from a C++ 6.0 host program but will not load from a VB 6.0 host program, producing a "Version 2.0 is not a compatible version" error instead.

Any ideas why the language of the host program matters and what causes a "Version 2.0 is not a compatible version" error?

Even a better description of a "Version 2.0 is not a compatible version" error could be helpful.
Did you change the CLSID or the interface name? Can you guarantee that the IDL was not changed?
The IDL file was copied directly from the old project to the new one, unchanged.
Wouldn't it have been easier to just recreate (recompile) the COM component with the latest and greatest, and use C# for the rest?
Last edited on
And I suppose the component was properly registered? I am guessing here because I've never seen or heard this error before. The usual ActiveX can't create object is the most common VB runtime error.
closed account (1vRz3TCk)
I believe that "Version 2.0 is not a compatible version" is a .net error (It is somthing to do with using a .net 2 assembly from .net 1.1) but I'm unsure of why you would get it from a VB6 app.
To freddie1: "use C# for the rest" turns into about a 5 year project. The product has to transition a little at a time.

To webjose: Definitely registered properly, since the VC++ host programs can find it without a problem.

To Code Monkey: That's my understanding too. Thus my confusion with the VB6 app that calls no other .Net assemblies, directly or indirectly.

Update: Based on a suggestion from an overseas co-worker I converted the COM DLL to a COM EXE. The rsult is that the "Version 2.0" error goes away, to be replaced by a timeout type of error since the process within the COM may run for several minutes.
Then my only guess is that VB6 thinks it has to load .net 1.1 instead of a higher framework. I don't do COM in .net (C++ still rules in this area), so I really can't comment on it.
Topic archived. No new replies allowed.