I think that Joe was implying that you have these two files compiled as
different assemblies, causing internal methods from one to not be visible to
the other. You need to compile one as a netmodule ("csc /t:module" from the
command line), and include that when compiling the other ("csc /addmodule
lib.netmodule"), so that they will be in the same assembly.
Suzanne Cook
My .NET CLR Loader blog:
http://blogs.gotdotnet.com/suzcook/
--
Please do not respond directly to this alias. This alias is for newsgroup
purposes only. This posting is provided "AS IS" with no warranties, and
confers no rights.
"msnews.microsoft.com" <Vi****@nospammy.com> wrote in message
news:O%****************@TK2MSFTNGP12.phx.gbl...
One more clarification please.
This means if I want a secure API DLL to be used by my EXE and unknown and
possibly rogue clients, I either give clients everything or limit my rich
EXE or duplicate code or pass out instances of an interface or something.
I want multiple modules in an app that can be updated automatically from
the web but if they can't see each other unless all classes are public, I see
one big DLL.
Thanks.
"Joe" <jo*@nospam.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... "msnews.microsoft.com" <vb********@progressiontech.com> wrote in message
news:uX**************@tk2msftngp13.phx.gbl... How can we access an internal class in a referenced file in a
multi-file assembly. All documentation states the obvious purpose of the
internal keyword on a class, but when referencing an assembly, I fear it means
single-file assembly. That means even if the assembly is strong-named and versioned, it will not reach internal classes. So much for code reuse
while hiding classes from external objects. I can't find examples or
explanations of how to do this.
Here is a layout of the problem:
_______________________________________________
namespace ns1 (with strong name)
Lib1.dll --------------------------------------------------
internal Class1
public Class2
App1.exe ------------------------------------------------
- Problem - references Lib1.dll in this multi-file assembly
but can only reach Class1 if it is public (a bad thing).
_______________________________________________
namespace ns2 (without strong name - any external application)
App2.exe -------------------------------------------------
- No Problem - references Lib1.dll and can access Class2 but
as expected not Class1
Hi VinceB,
App1.exe and Lib1.dll are separate assemblies. The strong name isn't a
factor here.
Joe
--
http://www.csharp-station.com