dummzeuch 1505 Posted November 28, 2019 (edited) I just tried to import a .NET assembly into the Delphi IDE: Component -> Import Compoent Select "Import .NET Assembly", press Next There I got a list of available assemblies, but that list is empty ??? 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 November 28, 2019 by dummzeuch Share this post Link to post
dummzeuch 1505 Posted November 28, 2019 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
Lars Fosdal 1792 Posted November 28, 2019 https://docs.microsoft.com/en-us/dotnet/framework/app-domains/install-assembly-into-gac Share this post Link to post
dummzeuch 1505 Posted November 28, 2019 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
dummzeuch 1505 Posted November 28, 2019 (edited) 32 minutes ago, Lars Fosdal said: https://docs.microsoft.com/en-us/dotnet/framework/app-domains/install-assembly-into-gac Yes, I read that. I used gacutil.exe to install the assembly. It's also listed in the output of gacutil /l . EDIT: gacutil from .NET 2.x does not list the assembly, so it probably has the same problem as Delphi 10.2.3. Edited November 28, 2019 by dummzeuch Share this post Link to post
dummzeuch 1505 Posted November 28, 2019 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
dummzeuch 1505 Posted November 28, 2019 I submitted a bug report for Delphi 10.3.3 (with screenshots from both, Delphi 10.3.3 (empty list) and Delphi 10.2.3 (list not empty) https://quality.embarcadero.com/browse/RSP-27046 This happened on both of my computers. 1 Share this post Link to post
Bernard 18 Posted November 18, 2020 I am having this issue in 10.4 update 1. Have you ever managed to find a resolution? Share this post Link to post
dummzeuch 1505 Posted November 19, 2020 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
Bernard 18 Posted November 21, 2020 Thank you. Is this problem a that only impacts some installations? Share this post Link to post
tomaszbinas 0 Posted January 12, 2021 Hello, has anyone found a solution to this problem? I have the same issue with a third party dll in Delphi 10.4 update 1 Share this post Link to post
pmi 0 Posted February 24, 2021 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
Bernard 18 Posted May 10, 2022 .Net import still producing empty list in latest version "Delphi 11.1" Share this post Link to post
Gordon Kenyon 0 Posted February 23 And still seems to be an issue in 12.0 Share this post Link to post
DelphiUdIT 176 Posted February 23 (edited) Uhmm, may be I'll probably say bullshit, but you can import assemblies from .NET only if they are flagged as COM compatible (they must be compiled in this way from Visual Studio). Others way are to use some instruments like CrossTalk or also JCL (from Jedi project). But I don't think that you will able to import like a component, only to call them like a DLL. You can also use some open source software like " ILSpy, the open-source .NET assembly browser and decompiler" to analize the .NET DLL. OF COURSE YOU MUST HAVE THE RIGHTS TO DO SO !!! Edited February 23 by DelphiUdIT Share this post Link to post
dummzeuch 1505 Posted February 23 There is a bug report on this (at least one). I even used one of my support tickets for this but Embarcadero could not help me. That was back, when Delphi 10.2 was the latest and greatest version. If I remember correctly they are looking into the wrong registry branch, so the fix should be easy (but maybe I'm overlooking something). I was lucky in so far as it turned out I didn't need to use an assembly after all. Share this post Link to post