0
I received a dll generated in vb6 to integrate with my api in Asp.net Core, na dll to various calculation methods.
With this, I must invoke these dll methods in my Asp.net core 3.0 project in visual studio.
You can import the dll to my Asp.net core project normally, and even invoke the methods. When starting my Asp.net project everything works normally, until the time to inform the requested parameters so that the method inside the dll is invoked
On the line in which my project in Asp. Net core instance my DLL, the following ero is shown shows the following error...
System.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {C0131351-6182-46C9-87E0-A509400E50AD} failed due to the following error: 80040154 Classe não registrada (0x80040154 (REGDB_E_CLASSNOTREG)).
Inside csproj, my dll is referenced as follows as it shows in xml
<ItemGroup>
<COMReference Include="CSGlobal.dll">
<Guid>9ddd0edf-9e32-48b0-ae31-5beb13a85606</Guid>
<EmbedInteropTypes>True</EmbedInteropTypes>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<WrapperTool>tlbimp</WrapperTool>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
</COMReference>
</ItemGroup>
registered it in Gac? You are not trying to run a 32-bit generated DLL on a 64-bit Runtime?
– Leandro Angelo
I registered it using Regsvr32, saw that on Asp.net the means to register is by regasm, however, if I log it directly with regasm returns me an error Regasm : error RA0000 : Failed to load 'C: Csglobal.dll' because it is not an Assembly . NET valid
– Fabricius Santos
would not be with the gacutil -i name.dll ?
– Leandro Angelo
with gacutil gave the following error Failure Adding Assembly to the cache: The module should contain an Assembly manifest.
– Fabricius Santos
In Managed settings platform this set for Any CPU
– Fabricius Santos