[Mono-devel-list] Problem with adding netmodule files to an assembly

alfius alfius at freemail.gr
Wed Mar 9 08:18:36 EST 2005


Hello,
I am trying to use .netmodule files in mono 1.1.4 but I am running into
problems. For example:

---- Adder.cs ----
namespace n1
{
	public class Adder
	{
		int Add(int x, int y)
		{
			return x+y;
		}
	}
}
-----------------

---- main.cs ----
using n1;
using System;

public class ModTest
{
	
	public static void Main(string[] args)
	{
		Adder a=new Adder();
		Console.WriteLine(a.Add(2,3));
	}

}
-----------------
I get:
$ mcs -target:module Adder.cs
$ mcs -addmodule:Adder.netmodule main.cs
main.cs(1) error CS0246: The namespace `n1' can not be found (missing
assembly reference?)
Compilation failed: 1 error(s), 0 warnings

Is this a problem with Mono or am I missing something?
If it is a problem, is there another way I can use netmodules in mono?

Thank you,
Alexandros




More information about the Mono-devel-list mailing list