mono - Searching for the best PCL profile for cross-platform development -
i working on extending number of supported platforms app, used support .net4/windows store/windows phone, hope cover mono android , ios. i've put business logic, models , view models portable class libraries (pcl) it's big dilemma subset of platforms should target. each combination causes fail. here results 4 platforms might use:
profile 78 (net45+wp8+store): no problem tpl,await/async , support callermembername attribute (used in bindablebase view model base class). mono.android project refers such library fails build complaining non-present system.runtime.dll should referenced.
profile 104 (net45+sl4+wp75+store): await/async don't work, callermember name not found, if remove references them, android project builds fine.
profile 147 (net403+sl5+wp8+store): await/async don't work, callermember name not found, if remove references them, android project builds fine.
profile 158 (net45+sl5+wp8+store): await/async don't work, callermember name not found, if remove references them, android project builds fine.
so not sure choose. profiles 78, 104, 147 limited, profile 78 1 supports both await/async , callermembername used bindablebase, fails on android complaining system.runtime.dll. if have experience pcl profile best match pcl targeting mono, please share thoughts.
thinking profile numbers hard - prefer think in terms of platforms.
ideally i'd love projects support:
- .net 3.5 , higher
- sl3 , higher
- wp7.x phone , higher
- monodroid 1.6 , higher
- monotouch ios6 , higher
- (mac desktop osx lion)
the main pcl project support mvvmcross - requires mvvm 'facilities' icommand. these facilities available in platforms .net 4.5 , higher... that's hard limit - nothing can - changes needs to:
.net 3.5 , higher.net 4.5sl3 , highersl4 , higher- wp7.x phone , higher
- monodroid 1.6 , higher
- monotouch ios6 , higher
- (mac desktop osx lion)
with selection in place, leads me profile number - 104 (no idea how platform decided this... gave asking long time ago!)
so i've targeted mvvmcross @ profile 104 - , stay there while wp7.x support still needed.
this selection mean mvvmcross cannot out-of-the-box support things async
/await
, callermembername
- compromise we've decided make - have users need wp7.
however, people asking await/async...
to use these new features, there bcl.async nuget hacks make them work in profile 104... or these users can target apps @ newer profile (one doesn't support wp7.x , sl4) - leads them build apps in profile 78, add references profile 104 assemblies.
neither of these sets of solutions works xamarin twins @ present - e.g. hit issues missing system.runtime.dll assembly. however, anticipate when xamarin officially supports pcls (and after alpha/beta testing) these problems resolved. official support due - why don't bother expending of time thinking these problems...
i expect in medium term mvvmcross drop support wp7.x , sl4. when happens, may move core libraries profile 78.
the other large platform know has started pcl support reactiveui. believe platform must use profile 78 because pcl version of reactive microsoft targeting 78.
Comments
Post a Comment