An old AVR Classic bug-a-boo raised its ugly head the other day for one of our long-time AVR Classic customers. It had been a long since we've seen this error, but, like riding a bicycle, and old debugging skill magically reactivated itself.

This issue applies only to AVR Classic. It does not apply to AVR for .NET.

The problem was that someway, somehow, the programmer's instance of AVR Classic 5.0 showed two references to an AVR DLL. I am not sure exactly how this problem occurs, but I think it's related to having a couple of versions of the same DLL project. However the problem occurs, it reveals itself as shown below in Figure 1:

Figure 1. AVR Classic "References" window showing duplicate DLL references

Notice that AVR, and therefore the Windows registry, say there are two "Project1" type libraries registered. That's not good. There should only be one of a given type library (or DLL) registered.

To resolve this issue, take note of the DLL for each referenced DLL. That info is shown at the bottom of the dialog. In this case, you can see that for the first "Project1' type library there is a DLL named "TestAVRClass.DLL" at this location:


Don't be confused by the difference between the type library name and the DLL name. The project should have dictated a rational type library name, but I fat-fingered the project name desperately trying to recreate this error.

To resolve this error:

  1. Close all instances of AVR Classic.

  2. Using the Windows File Explorer delete both physical DLL files. I didn't see it with this error, but I think I remember that sometimes there is only one physical DLL. That's OK if so, just delete the one you can find. Don't worry about the registry yet, we'll take care of that in a minute.

  3. With the error, DLL(s) are physically deleted from the Windows file system, open AVR Classic.

  4. Open AVR's Project->References dialog and scroll down to the errant, duplicate type library names. They should both still be shown as registered, even though the DLL(s) have been deleted from the file system. The Project->References dialog is reading its registration information from the registry.

  5. Select one of the error type libraries and click "Unregister." This should produce the dialog shown below:

  6. Click "Yes" to clean up the registry. Do this for both errant type libraries.

You should now be able to recompile the DLL project and see it registered correctly.

The edge of our knowledge

AVR Classic is now more than 25 years old. We were happy to have the resolution to this issue pop out of one of our long-unused brain wrinkles. Now, if we could just remember where we put our car keys.