I guess you can try to optionally disable it only in xbuild project system (Xamarin) by Condition. But I don't know if Xamaron/MonoStudio/XBuild somehow can tell you if it is xamarin / not visual studio itself.