Id like to see compiler warnings (configurable) when using API that is for a higher version than I am targetting. I would then want to be able to break my build on warnings and then gracefully handle the lower functional ability of iOS 4 whilst still using the iOS 5 API. I can do this with extension methods with ignore warning flags, for example.
Example: Lets say Im using class1 that has a number of properties. class1.GetMeANumber() is marked as iOS 5 and above, but Im targeting iOS 4.
If I use class1.GetMeANumber() I want my build to break on a warning, *except* where I specifically say its ok. That would mean Im totally aware of any API's Im using, and can offer appropriately reduced functionality where required.
@Jeff, isn't this something that should be done in the IDE using whatever source analysis is able to provide?
I thought he wanted it to break the build?
You can configure source analysis to show errors instead of warnings.
We acknowledge this enhancement request, therefore marked it as CONFIRMED.
However this does not necessarily mean we will take actions on it as we still need to discuss its feasibility internally and make sure it is not conflicting with other features.
About feasibility for instance, the roslyn analyser current does not understand when a given API is covered by an availability check.