Data types from web service seeping into COM TypeLib

I have a small .NET component, exposing COM interface to legacy clients. The interface itself is very simple (4 methods) and parameters are all of simple types (strings, ints, etc.). The component internally uses a web service - added as service reference - which exposes large set of classes. When I generate COM type library from my component, all the types from the web service make it in - even though there is no need for it. What do I need to do to prevent that from happening? Can I somehow mark everything from the web service I'm consuming as private?


Exposing COM components is a pain, is your entire project comvisible? I would recommend not marking it comvisible then explicitly marking each class you want exposed with the comvisible (true) attribute. I believe the first link is your exact issue.

A couple references you can look at:

How to elegantly prevent a webservice proxy from being exposed to COM?

Why is marking an assembly ComVisible(true) discouraged?

Need Your Help

Inserting/Removing hex padding with SQL Server 2008 R2?

sql sql-server regex tsql

I am working with a database that encodes strings to hex and then pads the entire string with 0's.

Android: Wakelock & handling orientation change

android service android-activity orientation

I'm using Wakelock in my application to prevent the phone from sleeping when the app is visible.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.