Blogs

Our goal for you is not the "perfect smile" it's the smile that is perfect for you.

Microsoft’s .NET-Mare For Developers: ASP.NET Core 2.0 Won’t Work On Windows-Only .NET

January 22nd
2018

Build Microsoft has made a change to its forthcoming ASP.NET Core 2.0 web framework so that it is now incompatible with the Windows-only .NET Framework, causing confusion and annoyance for some .NET developers.

The bewilderment is understandable. Here is a quick reminder of what various terms mean:

  • .NET Framework: The Windows-only .NET runtime and libraries that ship as part of Windows and are maintained with the operating system. The latest version is 4.7, included with Windows 10 Creators Update, and can be installed on Windows Server 2008 R2 and upwards.
  • .NET Core: The cross-platform fork of .NET, which runs on Windows, macOS, and Linux (various distros are supported). Current version is 1.0, with 2.0 in preview and set for release in the third quarter of 2017.
  • ASP.NET Core: The next generation of the ASP.NET web framework, which (until now) runs either on .NET Framework or .NET Core. The current version is 1.1, with version 2.0 promised at the same time as .NET Core 2.0.
  • .NET Standard: A specification that defines APIs available across different versions of .NET. Version 1.6 is supported by .NET Core 1.0 and .NET Framework 4.6.1 and higher, and also by Xamarin on iOS and Android. Version 2.0 is supported by .NET Core 2.0 as well as .NET Framework 4.6.1.

Until recently, the assumption was that ASP.NET Core 2.0 would target .NET Standard, and therefore run on .NET Framework as well as Core, but last week Microsoft development manager Eilon Lipton stated that the updated web framework will target .NET Core 2.0 only, meaning that it will no longer run on .NET Framework.

A busy thread on GitHub ensued, as developers come to terms with this incompatibility.

The difficulty is that although .NET Core generally performs better than .NET Framework, it is not as mature, and many existing .NET libraries do not work. Examples are the full Windows Communication Foundation (WCF) client libraries, System.Drawing, System.DirectoryServices (for Active Directory support), COM automation – which is a Windows-specific technology for calling native code – some cryptographic libraries, and the Oracle database provider.

Workarounds are available in some cases, such as calling into libraries compiled for .NET Framework from .NET Core, but this does not always work. Microsoft is also busy adding libraries to .NET Core that will plug some gaps, but the nature of a cross-platform framework is that not everything can be ported.