RE: Referencing a multifile assembly

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Chua Wen Ching (chua_wen_ching_at_nospam.hotmail.com)
Date: 07/03/04


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.
> 


Relevant Pages

  • RE: Referencing a multifile assembly
    ... > When you had code finish animal.cs, compile it with: ... csc /t:module animal.cs ... way Visual Studio handles multi files assemblies. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to avoid undesired default values?
    ... I am using "gfortran" to compile my codes. ... If you did know you would not be debugging. ... What do you think of subscript range checking as a debugging feature? ...
    (comp.lang.fortran)
  • Re: Embedding assembler in a language
    ... the type of a variant. ... For single operand codes, this is then used ... All this things can be decided at compile time. ... (probably every time an array element is accessed). ...
    (comp.lang.misc)
  • Re: How to avoid undesired default values?
    ... I may specify an integer or real number but forget to ... I am using "gfortran" to compile my codes. ... Controlling init checking by individual program units. ...
    (comp.lang.fortran)
  • Re: use module
    ... I am prone to use too many modules in my codes as different programme ... and then compile them using makefile. ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)