views:

53

answers:

1

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!

A: 

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.

sharptooth
thank you for your answer, but unfortunately that's not the solution as it seems.i'm searching the registry manually for any of my GUIDs ( run / regedit / strg+F / GUID ) but can't find any of them. even after registering the dll with the /windows/microsoft.net/framework64/... no GUID has been added.targetPlatform is anyCPU.running regAsm from the framework64-folder results in the same behaviour as running it from the framework-folder. even the outputs generated with regfile:<filename> are absolutely identical.
Nico
How do you search the registry exactly?
sharptooth
as mentioned in the comment: ( run / regedit / strg+F / GUID )
Nico
That should work. May it be that virtualization is kicking in?
sharptooth
if you're talking about registry virtualization, i think i can't foreclose it. but the command-prompt as well as regedit are run as administrator, so i don't see potential problems here. at least not clearly :/
Nico
What about running Process Monitor and looking what happens to registry when you run regasm?
sharptooth