Jump to content

Import .NET Assembly list is empty

Recommended Posts

I just tried to import a .NET assembly into the Delphi IDE:


  1. Component -> Import Compoent
  2. Select "Import .NET Assembly", press Next
  3. There I got a list of available assemblies, but that list is empty ???
  4. Pressing "Add" and selecting the DLL I wanted to import got me the OLE error 80131124, which according to https://www.megos.ch/files/content/diverses/doserrors.txt means "Index %s not found", which isn't really helpful


Is it really possible, that the list is empty? According to gacutils I have got a sh*tload of assemblies in the Global Assembly Cache

This is Delphi 10.3.3

Edited by dummzeuch

Share this post

Link to post

Trying the same with Delphi 10.2.3 at least gives me a non-empty list but unfortunately the assembly I want to import is not there.


Pressing "Add" and selecting the DLL dosn't show an error, but the assembly still isn't listed.


I noticed that Delphi seems to look for assemblies in c:\windows\assembly\gac_32 which isn't visible in the explorer. Explorer shows only c:\windows\assembly with the assembly name, version, processor architecture etc. Delphi seems to list most of the entries where the processor architeture is x86 so I assume that's the way the exploer show the content of the subdirectory gac_32.


The assembly I want to import isn't listed there.


According to the documentation on the Global Assembly Cache it is stored in c:\windows\microsoft.net\assembly. If I look there, I find sub directories gac_32, gac_64 and gac_msil and in gac_32 I can see the assembly I am looking for.


So, does that mean that Delphi only allows importing 32 bit assemblies?

And is it looking in the wrong folder even for that?

Can I simply copy the directory for the assembly I want from one folder to the other?

Share this post

Link to post

OK, I tried to copy the entry from c:\windows\Microsoft.NET\Assembly\gac_32 to c:\windows\Assembly\gac_32 . It still doesn't show up in Delphi and also doesn't show up in the explorer view of :\windows\Assembly . So that's probably not the solution.

Share this post

Link to post
32 minutes ago, Lars Fosdal said:

Yes, I read that. I used gacutil.exe to install the assembly. It's also listed in the output of gacutil /l .



gacutil from .NET 2.x does not list the assembly, so it probably has the same problem as Delphi 10.2.3.

Edited by dummzeuch

Share this post

Link to post

Is there a command line tool that does the same as the Import Component wizard?

I couldn't find anything in the online help.

Share this post

Link to post
8 hours ago, Bernard said:

I am having this issue in 10.4 update 1.  Have you ever managed to find a resolution?

No, but I noticed that the problem hasn't been fixed in 10.4. Never looked at it in 10.4.1 because I found a different way that does not require a dotNET assembly. That was my "last best" solution anyway.


(* "second best" would put it too mildly. Avoiding this was by far the best option.)

Share this post

Link to post

I have the same problem on Delphi ver. 10.3 importing a Net 5.0 assembly.


I figured out that if i have fewer than around 7 property/functions the import goes well.

If i have more then i get the 80131124 error when adding the assembly.


Delphi is perfektly cabable to call more than 7 functions. It is just the IDE that can't autogenerete the interface/TLB .pas file

Share this post

Link to post

.Net import still producing empty list in latest version "Delphi 11.1" :classic_sad:


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now