[Mono-dev] Creating DLL with ant task csc using gmcs.exe

Kornél Pál kornelpal at gmail.com
Fri Jun 30 08:20:31 EDT 2006


Hi,

If you want to execute a managed executable (gmcs.exe for example) using 
Mono, you have to execute mono.exe. (or mono on non-Windows platforms). 
Otherwise it will be executed agains Microsoft .NET Framework runtime.

gmcs.bat is doing this so you should use that. If it's on PATH and you 
simply use gmcs then gmcs.bat will be executed by Windows.

Kornél

----- Original Message ----- 
From: "Staffan Ström" <s.staffan at gmail.com>
To: <mono-devel-list at lists.ximian.com>
Sent: Friday, June 30, 2006 2:14 PM
Subject: [Mono-dev] Creating DLL with ant task csc using gmcs.exe


> Hi all!
> I'm trying to get ant to generate a dll using the task <csc>. I's using
> attribute "executable" to specify gmcs.exe.
> The source files compiles ok but after that I get the error message:
>
>
> [*csc*] error CS8088: Your .NET Runtime does not support `/target:module'.
> Please use the latest Mono runtime instead.
> I have .NET 2.0 installed. Version of mono is 1.1.13.8 (downloaded today).
> Does anyone have an idea what the problem is? It works fine from the mono
> command prompt...
>
> Command executed (both in ant and at mono command prompt:
>
>
> gmcs /nologo /debug- /optimize-
> /out:D:\etc\java\aten\Etc-Aten-subsystems-reda\build\dist\dotnet\etcreda.dll
> /target:module /nostdlib- /warn:3
> /doc:D:\etc\java\aten\Etc-Aten-subsystems-reda\build\dist\dotnet\etcreda_doc.xml
> /fullpaths /incremental-
> /reference:D:\etc\dotNET\lib\etcClientFramework.dll;D:\etc\dotNET\lib\etcFramework.dll
> ... and a lot of .cs files...
>
> Brgds Staffan
>


--------------------------------------------------------------------------------


> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 




More information about the Mono-devel-list mailing list