[MonoDevelop] Exclude files or references depending on Configuration

Michael Hutchinson m.j.hutchinson at gmail.com
Sun Nov 15 17:33:50 EST 2009


On Sun, Nov 15, 2009 at 12:21 PM, Cyrille Colin <colin at univ-metz.fr> wrote:
> Hi all,
> is there a way to exclude/include files or references for a project
> depending on a configuration ?
> for example if i would like to use mysql or postgres, I define
> configuration : mysql and postgres with some compilation define symbol.
> I used "#if def", it works but compilation needs booth reference. Also
> in asp.net case i would like to exclude pages instead of apply a #if def
> to an entire file.
> Is that possible ? is it the good way to do this?

The "correct" way would be to put MSBuild conditions on the references
in the project file. This would work with xbuild, MSBuild and VS.

However, I'm not sure whether MD handles them yet. This is certainly
something will work when MD uses xbuild to build projects. MD 2.2 has
an experimental option to do so, so you could try that too. Eventually
it will become the standard behaviour.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list