Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / June 2004

Tip: Looking for answers? Try searching our database.

regasm could not load type

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steven Campbell - 09 Jun 2004 17:46 GMT
I have a .NET DLL that has the following inheritance structure (each object
inherits from the object above it):

BaseObject (VB6 COM DLL)
COM Interop DLL (.NET)
Abstract BaseObject (.NET)
Abstract BaseObject2 (.NET)
Concrete Object (.NET)

To complicate matters, the Concrete .NET Class needs to be accessible from
COM. I have set the appropriate attributes to make this happen, and
everything works fine on my machine, and some others too.

To register on another machine, I use RegAsm. However, on some XP machines,
regasm is failing, with the error:

RegAsm error: Could not load type XX.XX.AppBase from assembly XX.XX.XX,
Version=0.9.1616.28364, Culture=neutral, PublicKeyToken=null because the
format is invalid.

where XX.XX.AppBase is the first abstract base object. All machines are
running .NET 1.1. I have tried to work around the problem by using .reg
files to register the DLL, but that just defers the error message until the
application tries to use the object.

Has anyone any ideas on how I can resolve this, or what causes it?
Steven Campbell - 10 Jun 2004 16:13 GMT
I have found a solution for this.   The problem turned out to be that my
.NET DLL exposed an ADO recordset. This was not a problem on machines with
Visual Studio.NET installed, because they have the primary interop assembly
for ADO (ADODB.DLL) in the GAC. However, most user machines do not. So the
solution was to copy ADODB.DLL from my local machine (C:\Program
Files\Microsoft.NET\Primary Interop Assemblies\ADODB.DLL) to the target
machine, and then install it to the GAC (gacutil -i ADODB.DLL).

~Steve

> I have a .NET DLL that has the following inheritance structure (each object
> inherits from the object above it):
[quoted text clipped - 22 lines]
>
> Has anyone any ideas on how I can resolve this, or what causes it?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.