[Mono-dev] Conditional compilation

Robert Jordan robertj at gmx.net
Thu Aug 30 16:45:00 EDT 2007


Angel Marin wrote:
> pablosantosluac escribió:
>> I have a code fragment like the following:
> [...]
> 
>>         <csc target="winexe" output="conditional.exe" debug="${debug}" 
>> define="${define}" >
> 
> [...]
> 
>> But when I run the app no output is generated.
>>
>> If I compile it directly with mcs it works as expected, printing the 
>> Console.WriteLine message.
>>
>> Do you find something wrong? Is it a bug on Nant?
> 
> Your nant task is building the code as winexe, so there is no console to
> write to. Try target="exe".

Or run the application with "mono --debug". The switch prevents the
console from being detached on Windows. Under Unix, the console is
never detached anyway.

Robert





More information about the Mono-devel-list mailing list