-
Notifications
You must be signed in to change notification settings - Fork 219
Portable Class Libraries (PCL) used in the MIEngine
Many of the MIEngine assemblies are Portable Class Library (PCL) projects. A PCL enables you to write and build managed assemblies that can be compiled once, but run against multiple versions of the .NET Framework. The MIEngine PCL projects are configured to support .NET Standard 1.3, which is supported by .NET Framework 4.6 and .NET Core Core 1.0.
PCLs work because the .NET Framework team took their API which was historically defined in a few different assemblies (ex: mscorlib.dll, System.dll, etc) and refactored the API definition (the assemblies that are compiled against) into a series of 'contract' assemblies (ex: System.Collections.dll) these assemblies define the shape of the API, but aren't used at runtime. At runtime, the implementation can either be in the full version of this dll, or, and this is always the case when running against the desktop CLR, the API can still be implemented in the traditional assembly (ex:mscorlib). In this later case there is a 'façade' version of the assembly that just forwards all the types back to the traditional assembly. There is a longer description of PCLs in a blog post from the .NET team (link).
The MIEngine uses PCLs to enable it to run both against the Desktop CLR (when used in Visual Studio) and CoreCLR so that it can run on MacOS/Linux/Windows for use in VS Code scenarios.