left-icon

.NET Core Succinctly®
by Giancarlo Lelli

Previous
Chapter

of
A
A
A

CHAPTER 8

Porting to .NET Core

Porting to .NET Core


Porting to .NET Core is not a task to be underestimated. Before porting any source code to .NET Core, you should work hard to understand your code base, its architectures, and all the dependencies that you have. Then you need to analyze if porting to .NET Core will give you any benefits, and if it does, how you plan to leverage them. Only after this initial phase you can pinpoint the portions of code that should or should not be ported, or even what portions of your code are okay to rewrite completely for .NET Core. The RTM version of .NET Core will have the following application models:

  • ASP.NET Core apps and services
  • Universal Windows Platform (UWP) apps
  • Console apps

Let’s see what the guys from the .NET team recommend for each of these workloads. We’ll cover the reasons to port and the metrics to determine good or bad porting candidates.

ASP.NET Core app and service: The primary reason to migrate your existing ASP.NET app is to run cross-platform. The best foundation for ASP.NET Core is a website using MVC, WebAPI, or both, while the not-so-fitting candidates are all those web apps built using WebForms, since in ASP.NET Core WinForms is not supported.

Universal Windows Platform Apps: You want to port your app to the UWP because it unifies the Windows device family, ranging from PCs to tablets, phablets, phones, and the Xbox. It now also includes headless Internet of Things (IoT) devices. However, if your application is a rich desktop application that takes advantage of Windows Forms or WPF, it would not be ideal because neither technology is supported on .NET Core. On the other hand, if you’re targeting Windows 8 or Windows Phone 8.1, you’re already done: these are .NET Core applications. If you maintain Windows Phone Silverlight apps, you’re pretty close. The Silverlight app should be a good candidate because the API set is heavily based on what was available in Silverlight: most APIs are either available in .NET Core or became WinRT APIs.

Console Applications: One of the biggest reasons you should look into using .NET Core for console applications is because it allows targeting multiple operating systems (Windows, OS X, and Linux). Another strong reason is that .NET Native for console apps will eventually support producing self-contained, single-file executables with minimal dependencies. Pretty much any console application is a good candidate for porting; it only depends on your dependencies.

The .NET team has been working really hard to make the transition to .NET Core as seamless as possible. Because of that, they’re constantly providing insights on their work. You can read more about porting to .NET Core here and on the official documentation available on the CoreFx GitHub repository.

Scroll To Top
Disclaimer
DISCLAIMER: Web reader is currently in beta. Please report any issues through our support system. PDF and Kindle format files are also available for download.

Previous

Next



You are one step away from downloading ebooks from the Succinctly® series premier collection!
A confirmation has been sent to your email address. Please check and confirm your email subscription to complete the download.