RE: Referencing a multifile assembly
From: Chua Wen Ching (chua_wen_ching_at_nospam.hotmail.com)
Date: 07/03/04
- Next message: Chua Wen Ching: "RE: Loading a cookie on Page_load (ASP.NET)"
- Previous message: Richard A. Lowe: "Re: Extending the definition of an Enum"
- In reply to: Pollux: "RE: Referencing a multifile assembly"
- Next in thread: Pollux: "RE: Referencing a multifile assembly"
- Reply: Pollux: "RE: Referencing a multifile assembly"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 3 Jul 2004 16:37:01 -0700
Hi Pollux,
Yeah i did try that way. You get couple of netmodules right? But it doesn't work in my computer. The parent.dll seems to be not working. I can't call Animal or Human class at all.
Well i able to get intellisense to work now with the solution i provided earlier.
When i type
Animal aVar = new (intellisense popup and point on Animal) Animal();
aVar.(intellisense popup, and i selected showmessage)showmessage();
For tooltips, I am not that sure, but I think if you add xml comments, it will appear.
Thanks for replying back. :) So is everything okay.
--
Regards,
Chua Wen Ching :)
"Pollux" wrote:
> In article <13F0972B-2532-4C99-B691-8B53DC9FCA7D@microsoft.com>,
> chua_wen_ching@nospam.hotmail.com says...
> > Hi Pollux,
> >
> > After trial and error. I had finalized the right steps to do a multifile assembly. I notice very funny and weird problems. But i write as detail as possible so you can follow up.
> >
> > Before we delve into coding, the hierarchy of the project:
> >
> > ParentProject Namespace (to achieve parent.dll)
> > --> animal.cs
> > --> human.cs
> >
> > Codes:
> >
> > animal.cs
> > ------------
> > using System;
> >
> > namespace ParentProject
> > {
> > class Animal
> > {
> > public void SearchForAnimal()
> > {
> > Console.WriteLine("This is lion");
> > }
> > }
> > }
> >
> > When you had code finish animal.cs, compile it with:
> >
> > csc.exe /t:module animal.cs
> >
> > it will generates animal.netmodule.
> >
> > Codes:
> >
> > human.cs
> > ------------
> > using System;
> >
> > namespace ParentProject
> > {
> > public class Human
> > {
> > public void MeasureHeight()
> > {
> > Console.WriteLine("Height is 180cm");
> > }
> > }
> > }
> >
>
> Ok, I haven't been able to reproduce the problem that prevented me from
> compiling, but I see what we're doing differenly and why we're seeing
> different results. I compiled both files separately and then created an
> assembly through the dll.
>
> csc /t:module animal.cs
> csc /t:module human.cs
> csc /t:library /out:parent.dll
> /addmodules:animal.netmodules,human.netmodules
>
> If you do ildasm utils.dll, you'll only see the manifest. In the object
> browser you won't see anything. I guess this is normal, it's just the
> way Visual Studio handles multi files assemblies. Also, if you use the
> class in VS, you won't get any intellisense for it, ie you won't get any
> tooltips giving you its methods.
>
- Next message: Chua Wen Ching: "RE: Loading a cookie on Page_load (ASP.NET)"
- Previous message: Richard A. Lowe: "Re: Extending the definition of an Enum"
- In reply to: Pollux: "RE: Referencing a multifile assembly"
- Next in thread: Pollux: "RE: Referencing a multifile assembly"
- Reply: Pollux: "RE: Referencing a multifile assembly"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|