Cross-Platform Dev with Portable Class Libraries
Courtesy Muhammad Siddiqi, VisualStudioMagazine
The Microsoft .NET Framework Common Language Specification (CLS) ensures code written in one language can generate Microsoft intermediate language (MSIL) that can be used from other compliant languages. But the various .NET target frameworks (Silverlight, Windows Phone, Xbox 360 and .NET for Windows Store apps) all have different sets of supported features and encompass different namespaces and libraries. So, "cross-platform development" really means "cross-platform development for a targeted framework."
When you need to share, code between these frameworks — if you really want to build something that runs on different platforms — you have to create separate libraries for each framework, often by recompiling an existing library for each framework. Using XAML to create views for different frameworks reduces the divide between the frameworks but, as a result, increases the need to share business code across frameworks in order to have truly sharable libraries that don’t need to be recompiled.