472,328 Members | 1,675 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Problem in generating .Tlb file form .NET 2005 assemblies

Hi all,
The type library is an important file for COM interop, without which
unmanaged code can't interact with managed code.
When I use .NET 2003, I can sucessfully generate .tlb file from a .NET Dll
(built with /clr:oldsyntax switch) - using tlbexp or Regasm /tlb.
The above technique never works for .NET 2005. (Both for Beta1 & Beta2).
The thing is that a .tlb file gets generated with an empty library statement
block, ano NO types are exported in the .tlb file.

We tried it several time in our HCLT lab using the tlbexp or the Regasm
utility which comes with .NET 2005. We also tried with the older vertion of
the regasm or tlbexp - but nothing works.
Where is the problem ? is it in the latest version of the IDE or with the
latest tlbexp or regasm utility?

Please advice

Sincerely
Sanjoy Sinharoy
HCLT - INDIA

Jul 22 '05 #1
2 2028
I don't have 2005 in front of me now, but I think there is an attribute
that must be applied to each public method that needs to be exposed to
COM. I think it is called ComVisible.

So you might have (in VB.Net code here):

<ComVisible(True)> _
Public Sub ExposedToCom()
. . .
End Sub

Jul 22 '05 #2
Thanks Chris, You are right. It works.

Regards
Sanjoy
"Chris Dunaway" wrote:
I don't have 2005 in front of me now, but I think there is an attribute
that must be applied to each public method that needs to be exposed to
COM. I think it is called ComVisible.

So you might have (in VB.Net code here):

<ComVisible(True)> _
Public Sub ExposedToCom()
. . .
End Sub

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Iain Bishop | last post by:
I'm trying to model objects for the following problem: A building site contains assemblies, each of which can contain other assemblies and/or...
15
by: Ken Allen | last post by:
I have been developing a suite of assemblies over the past couple of weeks, and this afternoon somethign started misbehaving. If I do not run the...
10
by: Saso Zagoranski | last post by:
hi, this is not actually a C# problem but since this is the only newsgroup I follow I decided to post my question here (please tell me where to...
2
by: SSRoy | last post by:
Hi all, The type library is an important file for COM interop, without which unmanaged code can't interact with managed code. When I use .NET...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories....
11
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with...
2
by: Jeff | last post by:
Hey asp.net 2.0 My asp.net 2.0 project has got a assembly load problem: Some of my web.config settings: <membership...
19
by: Larry Smith | last post by:
Hi there, When I run the following on my app's primary thread: System.Type.GetType("System.Windows.Forms.Form") It works as expected. If I...
0
by: James | last post by:
Occasionally, our websites that we host locally will all start generating errors. There don't seem to be any memory issues. There's nothing in the...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.