adapted for monodevelop 5.0 or above