accessing public members of a .net asembly exe

G

GS

It seems public members of a net assembly exe can not always be visible to
external callers despite adding the required project reference

I do see in class diagram, a public structure, some public delegates and of
course some gui elements as the exe is form class.

the assembly do have declared public interface

it seems, I cant see many public members even if included in the interface
until I make the assembly visible to COM.


is this com visible a must for the .net assembly to use it.
 
P

Peter Duniho

GS said:
It seems public members of a net assembly exe can not always be visible to
external callers despite adding the required project reference

It may seem that way, but I'm sure you're mistaken.
I do see in class diagram, a public structure, some public delegates and of
course some gui elements as the exe is form class.

the assembly do have declared public interface

it seems, I cant see many public members even if included in the interface
until I make the assembly visible to COM.

Any members of the assembly that are truly declared as public will be
visible without any COM-specific support being included. The
"COM-visible" setting certainly is not required. It's a red herring.

Post the code that you think has public members that don't show up when
the assembly is referenced, and we'll either be able to point out why
those members aren't actually public, or we'll be able to compile the
code into an assembly that works fine (suggesting that your problem is
not with the code but in how you're using the compiled assembly).

Pete
 
A

Arne Vajhøj

It seems public members of a net assembly exe can not always be visible to
external callers despite adding the required project reference

I do see in class diagram, a public structure, some public delegates and of
course some gui elements as the exe is form class.

the assembly do have declared public interface

it seems, I cant see many public members even if included in the interface
until I make the assembly visible to COM.

is this com visible a must for the .net assembly to use it.

Public really means public.

How are you checking if the "public" stuff is visible to
external callers?

Arne
 
G

GS

I think somehow my logon session, solution build(likely the culprit), or
visual studio was corrupted. I restarted the PC, repair the Visual studio.
did all configuration build w/o com visible.

voila,just like you said, I now can access all pubic members
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top