473,399 Members | 3,888 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,399 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 2078
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 materials. I have modelled this using a Site...
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 IDE and compiler the code from the command line,...
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 post this next time if you think this post...
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 2003, I can sucessfully generate .tlb file from a .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. The controls have been test and operate okay in...
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 updateable option set to ON. When I'm running the...
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 defaultProvider="AH_MembershipProvider" userIsOnlineTimeWindow="15">
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 then launch a thread via the "BackgroundWorker"...
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 Event Log that's out of the ordinary. But all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.