By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

COM Interop registration failed for Interface only DLL

P: n/a
Hi all,

I have a C# DLL containing only interfaces that I want to have a TLB (type
library) generated for.

For that I use the "Register for COM Interop" compiler option but it gives
me the error

*******************
Building satellite assemblies...
Registering project output for COM Interop...
COM Interop registration failed. There are no registrable types in the built
assembly.
---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped
*******************

Even with this error my TLB was well generated but it makes my build script
think that the build didn't succeed, which is not acceptable for me.

I understand why this is happening: this is because there are no types in my
assembly that are creatable. But that shouldn't lead to an error but rather
to a simple warning?? right? (please correct me if I am wrong)

Anybody knows a workaround so that my TLB will get generated and my build
result will not be a failure?

(from what I remember back in time using VB6 and VC6, it was acceptable to
have COM DLLs composed uniquely of "PublicNonCreatable" COM objects...)

Thanks
Eric
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Use TlbImp instead of RegAsm

/LM

"Eric St-Onge" <er**********@community.nospam> wrote in message
news:ca**********@newshost.mot.com...
Hi all,

I have a C# DLL containing only interfaces that I want to have a TLB (type
library) generated for.

For that I use the "Register for COM Interop" compiler option but it gives
me the error

*******************
Building satellite assemblies...
Registering project output for COM Interop...
COM Interop registration failed. There are no registrable types in the built assembly.
---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped
*******************

Even with this error my TLB was well generated but it makes my build script think that the build didn't succeed, which is not acceptable for me.

I understand why this is happening: this is because there are no types in my assembly that are creatable. But that shouldn't lead to an error but rather to a simple warning?? right? (please correct me if I am wrong)

Anybody knows a workaround so that my TLB will get generated and my build
result will not be a failure?

(from what I remember back in time using VB6 and VC6, it was acceptable to
have COM DLLs composed uniquely of "PublicNonCreatable" COM objects...)

Thanks
Eric

Nov 16 '05 #2

P: n/a
Err:

read TlbExp instead of TlbImp

/LM

"Luc E. Mistiaen" <lu**********@advalvas.be.no.spam> wrote in message
news:eZ**************@TK2MSFTNGP10.phx.gbl...
Use TlbImp instead of RegAsm

/LM

"Eric St-Onge" <er**********@community.nospam> wrote in message
news:ca**********@newshost.mot.com...
Hi all,

I have a C# DLL containing only interfaces that I want to have a TLB (type library) generated for.

For that I use the "Register for COM Interop" compiler option but it gives me the error

*******************
Building satellite assemblies...
Registering project output for COM Interop...
COM Interop registration failed. There are no registrable types in the built
assembly.
---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped
*******************

Even with this error my TLB was well generated but it makes my build

script
think that the build didn't succeed, which is not acceptable for me.

I understand why this is happening: this is because there are no types in my
assembly that are creatable. But that shouldn't lead to an error but

rather
to a simple warning?? right? (please correct me if I am wrong)

Anybody knows a workaround so that my TLB will get generated and my

build result will not be a failure?

(from what I remember back in time using VB6 and VC6, it was acceptable to have COM DLLs composed uniquely of "PublicNonCreatable" COM objects...)

Thanks
Eric


Nov 16 '05 #3

P: n/a
So you are suggesting to not use the "Register COM Interop" option in VSNET2003 and rather use a PostBuild step that will call TlbExp..

Using PostBuild steps it is also possible to call
regasm myasm.dll /TLB:myasm.tlb

which produces the same effect without errors (compared to VSNET2003 check box) and additionnaly registers the tlb in the registry.

Thanks for your help
Eric

"Luc E. Mistiaen" wrote:
Err:

read TlbExp instead of TlbImp

/LM

"Luc E. Mistiaen" <lu**********@advalvas.be.no.spam> wrote in message
news:eZ**************@TK2MSFTNGP10.phx.gbl...
Use TlbImp instead of RegAsm

/LM

"Eric St-Onge" <er**********@community.nospam> wrote in message
news:ca**********@newshost.mot.com...
Hi all,

I have a C# DLL containing only interfaces that I want to have a TLB (type library) generated for.

For that I use the "Register for COM Interop" compiler option but it gives me the error

*******************
Building satellite assemblies...
Registering project output for COM Interop...
COM Interop registration failed. There are no registrable types in the

built
assembly.
---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped
*******************

Even with this error my TLB was well generated but it makes my build

script
think that the build didn't succeed, which is not acceptable for me.

I understand why this is happening: this is because there are no types in
my
assembly that are creatable. But that shouldn't lead to an error but

rather
to a simple warning?? right? (please correct me if I am wrong)

Anybody knows a workaround so that my TLB will get generated and my

build result will not be a failure?

(from what I remember back in time using VB6 and VC6, it was acceptable to have COM DLLs composed uniquely of "PublicNonCreatable" COM objects...)

Thanks
Eric



Nov 16 '05 #4

P: n/a
Oops, small problem!

It appears that VSNET2003, by default, is not able to find regasm when used in post build steps!!!
Is there a way to solve that ? (hardcoding the path to the file is not acceptable because it won't work when others will build the solution)

If I use TLBEXP, will my tlb registered in the registry?
If not, how do I have it registered?

Thanks
Eric

"Eric St-Onge" wrote:
So you are suggesting to not use the "Register COM Interop" option in VSNET2003 and rather use a PostBuild step that will call TlbExp..

Using PostBuild steps it is also possible to call
regasm myasm.dll /TLB:myasm.tlb

which produces the same effect without errors (compared to VSNET2003 check box) and additionnaly registers the tlb in the registry.

Thanks for your help
Eric

"Luc E. Mistiaen" wrote:
Err:

read TlbExp instead of TlbImp

/LM

"Luc E. Mistiaen" <lu**********@advalvas.be.no.spam> wrote in message
news:eZ**************@TK2MSFTNGP10.phx.gbl...
Use TlbImp instead of RegAsm

/LM

"Eric St-Onge" <er**********@community.nospam> wrote in message
news:ca**********@newshost.mot.com...
> Hi all,
>
> I have a C# DLL containing only interfaces that I want to have a TLB

(type
> library) generated for.
>
> For that I use the "Register for COM Interop" compiler option but it

gives
> me the error
>
> *******************
> Building satellite assemblies...
> Registering project output for COM Interop...
> COM Interop registration failed. There are no registrable types in the
built
> assembly.
> ---------------------- Done ----------------------
>
> Build: 0 succeeded, 1 failed, 0 skipped
> *******************
>
> Even with this error my TLB was well generated but it makes my build
script
> think that the build didn't succeed, which is not acceptable for me.
>
> I understand why this is happening: this is because there are no types

in
my
> assembly that are creatable. But that shouldn't lead to an error but
rather
> to a simple warning?? right? (please correct me if I am wrong)
>
> Anybody knows a workaround so that my TLB will get generated and my

build
> result will not be a failure?
>
> (from what I remember back in time using VB6 and VC6, it was acceptable

to
> have COM DLLs composed uniquely of "PublicNonCreatable" COM objects...)
>
> Thanks
> Eric
>
>


Nov 16 '05 #5

P: n/a
> If I use TLBEXP, will my tlb registered in the registry?
Don't think so
If not, how do I have it registered?

Use RegSvr32.exe maybe

/LM
Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.