ADODB 2.7 COM Reference No Longer Registered in VS2012

Viewed 1597
  • Visual Studio 2012
  • VB.Net
  • .NET 4.0
  • Build Machine x64
  • Build Config AnyCPU
  • msado27.tlb

This project is not new and has been built 100s of times over the past 2 years. With in the past 3 weeks something has changed and a COM reference to the Microsoft ActiveX Data Objects 2.7 library is no longer able to registered. When I try to reselect it from the available COM entries it is visible and selectable.

Com reference list

After selecting you can see the yellow triangle

reference tree node with yellow triangle

Then viewing it thru the its properties you can then see there is no path being shown.

reference properties

When viewing thru the project properties -> references it display

project properties references

If I select a newer version such as 2.8, 6.0, or 6.1 they will register. However if I select an older 2.5 it acts the same way.

Any suggestions or theories on what may have happen or how to verify if the .dll in the GAC or Primary Interop Assembly actually has definitions and or implementation for version 2.7?

And by the way I do realize that this is an extremely old version, but this current .Net project has additional COM references/dependencies which rely on this particular version and I am unable to switch to a newer version at this time.

1 Answers

Well after a painful day and a lot of wasted time I decided to go the route of re-registering the types again using regasm which I didn't think really had a chance of fixing the problem. Low and behold that was the problem.

The fix for me...

  1. Open the developer console for VS2012 as Administrator
  2. Navigate to the GAC area for your adodb.dll @ %windir%/assembly/gac/adodb/7.0.3300.0__b03f5f7f11d50a3a
  3. Then run the command "regasm adodb.dll" and you should receive the "Types registered successfully" message
  4. Return to VS2012 and all current references to

Note: Early on when reviewing the registry values for the type libraries found in the adodb.dll file I noticed that the version that would not register in VS (2.7, 2.6, and 2.5) did NOT have Primary Interop Assembly value for there keys as the newer versions did. After running regasm those value were added in for the older versions.

Shows primary interop assembly info for v2.7 after running regasm

Related