3
votes

i've got a c#-dll and registering via regasm tells me success, but the GUIDs have not been added to the registry and therefore, the component can't be used anywhere. and i've got simply no idea why :(

class attributes:

[ProgId( "blup" )]
[ClassInterface( ClassInterfaceType.None ), ComSourceInterfaces( typeof( blap ))]
[Guid( "0CFEF92B-A155-4353-B7A3-58A717193E0C" )]
[ComVisible( true )]
public class blup
...

interface attributes:

[Guid( "9FD1B3E5-4873-403a-91AA-2EEC7296B38D" )]
[InterfaceType( ComInterfaceType.InterfaceIsIDispatch )]
[ComVisible ( true )]
public interface blap
...

assemblyInfo.cs:

...
[assembly: ComVisible( true )]
[assembly: Guid("37639A04-9DAC-40ee-ADBB-2F07F78FD265")]
...

option to make assembly com-visible is set true. registering for com-interop ist set false, since i don't want it to be registered with every build.

registering via regasm /codebase -> success. registering via regasm /codebase /tlb -> success.

but in both cases, i can't find any of my GUIDs in the registry.

adding the /regfile param to regasm, the file is generated but only consists of there lines:

[HKEY_CLASSES_ROOT\Record\{D4DAB0A5-AC0A-3498-BD1E-6665735B5649}\1.3.3.7]
"Class"="<classname>+eventType"
"Assembly"="<name>, Version=1.3.3.7, Culture=neutral, PublicKeyToken=bba2258cd5ab986c"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///<filename>"

the GUID from the regfile isn't used anywhere in the vs-project. the whole thing is running - or rather not running - with visual studio 2008 on windows 7 64.

thanks for any hints in advance. if i've missed to give some informations, please let me know!

2
I have this same issue, and it's been 4 years with no answer. Did you ever figure it out? Strange thing is that it says successful on 2 different machines. But only one of those machines has the entries added to the registry. - mdiehl13
Okay, I figured out my issue. The computer I was installing to didn't have extensibilityMSM.msi installed yet. The installer had it installing after calling Regasm instead of before. - mdiehl13

2 Answers

0
votes

The problem is likely in the different view of the registry for 32-bit and 64-bit programs. Something like you register the .dll as a 64-bit server and then look with 32-bit regedit or vice versa.

0
votes

I got into the same issue and found out the problem. It seems that the interface is not registered, because the type library is not registered.

So you have to use:

regasm /codebase /tlb Mylib.dll

Note: Sorry, I thought you were not able to see the interface entries in the registry, so I suggested the /tlb option.