.NET Core
.NET Standard
UWP
PCL
Portable Libraries

Difference between .Net Core, Portable, Standard, Compact, UWP, and PCL?

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

.NET Ecosystem: Understanding its Variants

The .NET framework has evolved significantly over time, introducing a variety of platforms and runtime environments to cater to different development needs. This article explores the differences between .NET Core, Portable Class Library (PCL), .NET Standard, .NET Compact Framework, Universal Windows Platform (UWP), and Portable libraries, shedding light on their use cases, advantages, and limitations.


.NET Core

.NET Core is an open-source, cross-platform framework for building modern, cloud-based, Internet-connected applications, such as web apps and microservices. It supports Windows, macOS, and Linux operating systems, making it highly versatile for developers targeting different environments.

  • Key Features:
    • Cross-Platform: Enables deployment across various operating systems.
    • Microservices-Friendly: Ideal for microservice architectures due to its modular and lightweight nature.
    • High Performance: Known for high performance, especially with ASP.NET Core.
    • Continuous Deployment: Supports modern DevOps practices, allowing for efficient CI/CD pipelines.
  • Use Case Example:
    • Building a web API that needs to run on different server architectures without modification.

Portable Class Library (PCL)

Introduced as a way to create libraries that can be used across multiple .NET frameworks like .NET Framework, Xamarin, UWP, and Silverlight, PCLs were once the go-to solution for code sharing.

  • Key Features:
    • Multi-Framework Compatibility: Targets a predefined set of frameworks.
    • Reusability: Facilitates reusability of code across different .NET platforms.
  • Limitations:
    • Flexibility: Limited by the least common denominator of APIs supported by the target frameworks.
    • Superseded by .NET Standard: Its role diminished as .NET Standard evolved to provide a better solution.
  • Use Case Example:
    • Creating a shared library for an app intended to work on both a WPF and a Silverlight app.

.NET Standard

.NET Standard is a formal specification of .NET APIs that are intended to be available across all .NET implementations, serving as a more robust alternative to PCL for code sharing.

  • Key Features:
    • Base Library Unification: Provides a set of APIs that all .NET platforms implement.
    • Compatibility Layer: Allows code to work seamlessly across different .NET platforms.
  • Advantages Over PCL:
    • Broader API Surface: More extensive range of APIs available as compared to PCLs.
    • Future-Proofing: Facilitates long-term maintainability and compatibility across evolving .NET frameworks.
  • Use Case Example:
    • Developing a library that works across Xamarin, .NET Core, and .NET Framework without the need for separate projects.

.NET Compact Framework

Designed for small-footprint devices, .NET Compact Framework is a subset of the .NET Framework for mobile and embedded environments.

  • Key Features:
    • Tailored for Small Devices: Optimized for limited-resource environments such as feature phones and embedded systems.
    • Subset of .NET Framework: Provides essential .NET features, focusing on a constrained API set.
  • Limitations:
    • Limited API Set: Does not support the full functionality of the complete .NET Framework.
    • Niche Market: Primarily targeted towards older mobile and specialized embedded systems.
  • Use Case Example:
    • Developing an industrial control application running on a legacy handheld device.

Universal Windows Platform (UWP)

UWP is an application development platform created by Microsoft that allows developers to create apps for Windows 10 devices.

  • Key Features:
    • Unified Windows Experience: Allows a single app to run on various Windows 10 devices, such as PCs, tablets, Xbox, etc.
    • Modern UI: Supports immersive hand-coded user experiences with XAML.
  • Limitations:
    • Windows-Centric: Applications are not portable to non-Windows platforms.
    • Complexity in Submission: The app deployment is often constrained by the Windows Store requirements.
  • Use Case Example:
    • Developing a game that runs seamlessly across a user's PC, tablet, and Xbox.

Portable Libraries

Although often confused with PCL, the term "portable libraries" can also refer to libraries designed to be platform-agnostic and shared across platforms.

  • Key Features:
    • Share across platforms by focusing on reduced dependency and generic programming.
    • Can vary in implementation and goal, typically not tied to a predefined framework set.
  • Limitations:
    • Lack of formal specification or guarantee for future-proof compatibility as seen with .NET Standard.

Comparison Table

Below is a summary table contrasting the discussed variants:

Feature/Aspect.NET CorePCL.NET Standard.NET Compact FrameworkUWPPortable Libraries
Platform SupportCross-PlatformMultiple .NET-based frameworksAll frameworks implementingTargeted legacy and embeddedWindows 10 DevicesMultiple, non-standard focus
Target AudienceModern, cloud-nativeMulti-platform code sharingFuture-proof code sharingEmbedded/mobile developersWindows-focused developersGeneric cross-platform
Primary Use CaseWeb, microservicesLibraries across .NETUnified API specificationLegacy and specialized devicesWindows 10 app developmentPlatform-agnostic libraries
API ScopeComprehensiveLimited to least common featuresBroadLimitedRich, modern UI controlsVaries
Current RelevanceHighly relevantSuperseded by .NET StandardHighly adoptedDiminishing useRelevant to Windows 10 devCase-specific application

In summary, each of these .NET frameworks and libraries plays a specific role within the development ecosystem. While .NET Core, .NET Standard, and UWP cater to modern application development in varying contexts, technologies like PCL and .NET Compact Framework have provided utility in transitioning periods of .NET's evolution. Understanding their differences helps developers choose the right tools and strategies for building robust applications.


Course illustration
Course illustration

All Rights Reserved.