[MonoDevelop] Equivalent to VSTUDIO_BUILD macro

Charlie Poole charlie at nunit.com
Mon Nov 16 16:14:31 EST 2009


Hi,

> > For Visual Studio there is a default macro (VSTUDIO_BUILD) which I 
> > will use to identify the app. is build from IDE or command line.
> >
> > Is there any any equivalent macro available for Monodevelop IDE ?
> >
> > My requirement is to write the code as follows,
> >
> > #if VSTUDIO_BUILD
> >     Console.WriteLine("This is visual studio"); #elif MONO_BUILD    
> > //assume that in mono the macro is MONO_BUILD
> >     Console.WriteLine("This is mono develop"); #else
> >     Console.WriteLine("This is must be command line"); #endif
> 
> There is no such define in MD.
> 
> I'm curious why you need it, because CIL binaries are 
> portable, hence it shouldn't matter where you build the app, 
> so depending on such defines is a bad habit IMO.
> 
> However, if you can make a good case this, we'll consider adding it.

I'm not the OP but I have used such a macro in the past where the
build within an IDE created a different directory structure from
what I create in a batch build. Consequently, it was generally in
my tests that I needed it.

Charlie





More information about the Monodevelop-list mailing list