responses inline ... ----- Original Message ----- From: "Ian MacLean" <[EMAIL PROTECTED]> To: "Gert Driesen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, March 01, 2003 3:16 AM Subject: Re: [nant-dev] Compiling for Mono
> Gert Driesen wrote: > > > I'm trying to build a assemby using Mono 0.20 on Windows, but apparently > > the Mcs task calls the mcs.exe, this will cause Mono to compile an > > assembly using the .NET runtime instead of the Mono runtime. > > > The task should instead call "mono mcs.exe [options]" > I think *should* is pushing it. As a managed exe it *should* be able to > run against any runtime on the system and if NAnt is already running > against the .Net runtime then it seems a bit over the top to be spawning > another runtime. > But compiling an assembly using mcs.exe does not guarantee that it runs on the Mono runtime, because mcs.exe will link the .NET Framework assemblies. This can cause a compiled assembly to work on the .NET Framework runtime, but not on the Mono runtime. You're actually saying that you should not compile assemblies that target Mono when Nant is running in the .NET Framework 1.0 ? So when you want to build assemblies for 4 runtimes, you have to run the build process 4 times using 4 different runtimes ?? I really hope I misunderstood :-) I hope you understand that there's a need to use Nant to build assemblies for multiple runtimes in one go, as I am doing now. So it's perfectly possible, but just not with Mono right now. > > should be specified with a full path (eg. mono > > c:\mono-0.20\install\bin\mcs.exe -target:exe -out:test.exe > > -recurse:*.cs) or the mcs.bat file (which makes sure that mcs compiles > > using the Mono runtime). > > Its not that simple. If you want to be using mono to run mcs then you > probably want to use it to run *every* managed exe - not just mcs.exe. > So maybe if you start nant with mono on windows ( mono NAnt.exe > -buildfile: ... ) then every managed app that is started should be > started with "mono somemanagedapp.exe ). No definitely not, what I want is to have one buildfile that builds our assembly for the following runtimes : - .NET 1.0 - .NET 1.1 - .NET Compact Framework 1.0 - Mono So I definitely do not want to use the Mono mcs compiler to compile our assembly for the .NET Framework 1.1 ! I need NAnt to run on whatever runtime I decide and be able to compile assemblies using whether runtime I need. This is working fine right now for the first three runtimes I mentioned, but not for Mono because in this case you really need to compile by using the following commandline : <mono framework compiler directory>\mono.exe <mono framework compiler directory>\mcs.exe [options] .... eg. c:\mono-0.21\install\bin\mono.exe c:\mono-0.21\install\bin\mcs.exe -target:library -out:log4net.dll -recurse:* .cs -define:DEBUG;TRACE;MONO when you would use : mcs.exe -target:library -out:log4net.dll -recurse:*.cs -define:DEBUG;TRACE; MONO you would be able to compile code that uses classes that are not available in Mono, because the mcs compiler would use the .NET Framework assemblies. I don't think this is something you'd want. I do understand that it's possible that other tasks would need to be able to execute using the Mono runtime too, this complicates things a little yes ... But this could be resolved by executing these other tasks using the mono.exe, but I agree, it does seem a bit over the top to be spawning a runtime each time ... But the only alternative is to execute same buildfile multiple times (once for each supported runtime) and I don't think this is an option ... Nant is a tool for automating build processes, no ? > > > Apparently some of the commandline options should be changed too. > > Ideally the mcsTask should go. There should be no need to have a > different task for every c# compiler. I agree, but as I said in a previous mail : the task should still be able to have a different behaviour depending on the runtime that you specified. eg. an instance of the csc task should still be able to check if it's currently targeting mono and behave differently in that case. > > > Do we wait until Ian finishes his runtime support or do we patch this > > right now ? > > I think we should decide what the correct option is first. ok, I agree Gert ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers