No support for Windows XP in Caliburn.Micro 2+?

Topics: Feature Requests
Nov 14, 2013 at 9:26 AM
As I've noticed that there will be no support for .NET 4 in CM 2. Is it a definitive decision?
Believe me, I do love .NET 4.5 new features but because there is no .NET 4.5 for Windows XP I need to stick to .NET 4.0. Windows XP is still ~40% of the market. That's a huge share.
Nov 14, 2013 at 10:14 AM
We cannot support .NET 4.0 in portable code as INotifyCollectionChanged is missing there.
For details see https://twitter.com/davkean/status/329658035490418688
Nov 14, 2013 at 1:18 PM
Net 4 can be supported. You just have to have a second project file targeting explicitly .NET 4, just as CM 1.x did.

The platform enlightenment pattern can still be used to keep your head sane.
Dec 17, 2013 at 2:06 AM
how to use on windows XP?
Dec 17, 2013 at 4:19 AM
zzhzjg wrote:
how to use on windows XP?
you would need to use CM v1.52 for XP, support is being dropped due to constraint of PCL in v2.0
Dec 17, 2013 at 8:51 AM
@tibel: I would like to move on to CM v2, yet I still need Windows XP support. Are you going to drop it completely, or you still accept patches to target .NET 4.0 (using EddieGamon approach would be the only feasible solution)?
Dec 17, 2013 at 8:56 AM
Yes, we will accept patches.
Only issue I see at the moment is with nuget packaging (net4 vs. net45 and pcl).
Dec 17, 2013 at 8:57 AM
I'll try to toy with it in the next few days, and see what comes out.
Dec 19, 2013 at 2:27 PM
@BladeWise: I'm looking forward to your patch. I just had to downgrade my client app from .NET 4.5 to 4 to support Windows XP.
Fortunatelly Microsoft decided to support async/await in .NET 4 with the Microsoft.Bcl.Async package, so I can use CM 1.5.2 for .NET 4 with async/await. I realy hope that CM 2 (with somehow added .NET 4 support?) can still be used with async/await under .NET 4...
Dec 31, 2013 at 12:57 PM
Edited Jan 9, 2014 at 3:19 PM
I provided a fork of the current CM 2.0 code-base, supporting NET40.
I added a specific 'core' project for Caliburn.Micro.NET40, including a required extension for dispatcher to make the code compatible with the rest of the code-base.
Additionally, a new compiler switch (NET40) was added and used in the XamlPlatformProvider to solve an issue with changed implementation of DispatcherOperation in NET45 (NET40 version does not provide Task property).

You can find the code here.

I issued a pull request. The design is consistent, even if a PCL could not be used directly. The same approach could be used to provide a specific SL4 version. I considered a different approach, using a separate PCL for NET40/SL4, but there are issues in that case (i.e. System.Threading.Tasks and INotifyCollectionChanged support). All in all, since SL5 supercedes SL4 completely, and is supported in every platform (as long as I know), I think that it is safe to abandon it, while .NET 4.0 is still a requirement for Windows XP machines.