1

I have a .NET DLL which is installed to the GAC, as it is used by several applications.

One of these is an Excel workbook which references the DLL using .NET's COM interop facility. The COM tlb file is installed to an application directory.

This all works fine except when an updated version of the DLL is installed. On some PCs the COM reference within the workbook breaks (it's shown as "Missing"). Running the relevant macro crashes Excel. This can be fixed by un-ticking the missing reference within the VBA editor and re-adding the reference to the DLL, but I'd rather my users didn't have to do this each time they open it.

All the relevant objects and methods have unchanged signatures and are decorated with unchanging GUIDs.

Any ideas why the reference breaks?

EDIT: After some investigation deep in the Registry, it looks like the COM registration isn't happening correctly on install. This didn't show up as an install failure, however. Still no closer to finding the underlying cause, though.

1 Answer 1

0

We've had issues here as well; as such, our patch programs always run gacutil.exe /cdl to clear the download cache. The solution didn't make sense to us, as we didn't download our assemblies via the browser, but it helped. To see if will help you, try running gacutil.exe /l to see if your assembly is in the download cache.

Also, note that for some reason, gacutil is not redistributed with the framework, so you will first need to copy it to the system in question.

1
  • Thanks for the tip, but it didn't help with this particular issue. Feb 20, 2009 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.