0

Because Mono doesn't support some windows functions in .NET, is there any pre-compiler derivative that indicates that the compiler is a mono compiler?

Example, in Visual Studio there is a derivative #DEBUG and #TRACE is there such a derivative for mono that's something like `#MONO' that automatically is added if the compiler is mono?

Or do we have to add the derivative ourselves and change as necessary?

TheAJ
  • 10,485
  • 11
  • 38
  • 57
  • 1
    Why do you want to decide this at compile time, not at run time? – CodesInChaos Jan 25 '12 at 18:28
  • 1
    http://stackoverflow.com/questions/4406211/compiler-if-directive-to-split-between-mono-and-net – Sarim Jan 25 '12 at 18:29
  • You can compile using mono and run on Windows (with or without mono). You can also compile using Visual Studio and run on linux, mac and Windows. So checking which compiler is being used will likely not help you with the problem you're trying to solve. – Rolf Bjarne Kvinge Jan 25 '12 at 22:28

1 Answers1

0

Mono compiler defines MonoCS, I think

So:

#if __MonoCS__

should work...

TheNextman
  • 12,428
  • 2
  • 36
  • 75