Build 2018: How Microsoft is embracing cross-platform development


Build 2018: Compiling to a container is now fully integrated into Visual Studio 2017

Source:  Microsoft

Microsoft has undertaken several initiatives to make targeting Linux or cross-platform projects possible with Visual Studio. Enabling WSL is not essential. At the end of 2014, the company announced .NET Core, a fork of the .NET Framework which is open source and runs on Windows, Linux and Mac. Now at version 2.1, the supported platforms include the ARM-based Raspberry Pi.

.NET Core is supported by frameworks including ASP.NET Core and Entity Framework Core, both also now at version 2.1.

Microsoft still also supports the Windows-only .NET Framework, though the company has stated that new investment will be .NET Core and not .NET Framework. At Build, Microsoft announced that the forthcoming .NET Core 3.0 will support Windows desktop applications, a key step in shunting .NET Framework towards a legacy support role.

The snag here is that .NET Core only supports a subset of .NET Framework features. Notable omissions are support for ASP.NET Web Forms, WCF (Windows Communication Foundation) services, and Windows Workflow Foundation. There is also a bias towards C# in .NET Core, so that while Visual Basic and F# are also supported, they do not support all project types.

On the other hand, there are also strong reasons to use .NET Core. Raw performance is generally better, sometimes dramatically better. It has also been designed with microservices in mind and runs nicely in both Linux and Windows containers.

In Visual Studio, targeting Linux containers with ASP.NET Core is a matter of installing Docker for Windows (which uses Hyper-V virtualisation), and adding Docker Linux support to the application via a right-click menu. Note that Microsoft now also offers SQL Server for Linux.

View All Photo Stories
Data Center
Data Management