473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

COM Interop registration failed for Interface only DLL

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
5 5090
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
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
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
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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Johan Henningsson | last post by:
Hello, when I try to compile .net projects that is using interop then they fail. I get this error: "COM Interop registration failed. Could not load the assembly to be registered." What can...
0
by: Janus Kamp Hansen | last post by:
I have had this error: 'COM Interop registration failed. Type library exporter can not load required library MSCOREE.TLB.' I have found a solution, by using the Regmon tool...
1
by: Nadav | last post by:
Hi, Introduction *************** I have a system build of a collection of 'Native COM objects' and '.NET COM interop' objects, all of the COM objects are managed through a 'Native COM' layer,...
2
by: Peter | last post by:
Hello Thanks for reviewing my question. I am writing a shared Office AddIn that uses a couple of user controls on a form and from time to time I receive this error "COM Interop registration...
0
by: Mark | last post by:
I have created a library that exposes classes to COM clients using the attribute . My library references 2 other libraries, lib1 and lib2, both of which are created by other developers on my...
0
by: Dan Bass | last post by:
One day, out of the blue, anything COM interop related stopped building. When building any project (VB / C#) that has a COM interop interface (my own home grown projects, or a Visual Studio .Net...
12
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
8
by: Nadav | last post by:
Hi, Introduction: ********************* I am writing a mixed mode application I have a COM module and a .NET module that communicate with each other. The COM exposes a custom sink interface,...
0
by: zoneal | last post by:
I am having two problems concerning COM Interop Registration: While building a project (COM DLL) that has reference to other DLL project (not COM). I getting this error: COM Interop...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.