Your Guide to Working With the Right .Net Core Versions

      Comments Off on Your Guide to Working With the Right .Net Core Versions
.Net Core Versions

Programming is one of the most useful skills that you can learn. In order to make the most of it, though, there are certain nuances that you need to keep in mind.

Choosing which .NET core versions to work with is a big decision. This guide will walk through some of the factors you need to consider when choosing, and then we’ll dive into how to configure your projects/solutions in order to specify which version or types of .NET you want to use.

Let’s dive in.

What Type of Versions Are There?

There are a few kinds of .NET core versions:

Latest Stable – Commonly the latest released version. This is what you get if you use “latest” in your package manager.

LTS (Long Term Support) Versions – These are releases that have been tested for stability, and will be supported by Microsoft with bug fixes and security patches for a longer period of time than the latest release. Currently, .NET core 1.1 LTS and .NET core 2.0 have an extended support lifecycle.

Preview – These may or may not be stable, but gives users a chance to try out new features before they make it into an LTS release.

The features in a preview version may change, and they may be removed entirely before making it into a stable release, so use them at your own risk.

There are 3 types of .NET core applications:

  • Class Libraries
  • Web Applications (including MVC and Web API projects)
  • Universal Windows Platform (UWP) applications.

Application type matters when it comes to choosing which .NET versions to use. Let’s first discuss how a class library project affects your choice of .NET core version.

Choosing a .NET Version For a Class Library

A class library is a reusable way to develop code. If you’re getting started with web development, this may be the easiest route.

Choosing which .NET core version to work with is slightly different for class libraries than it is for web applications because:

  • Class library projects don’t have a web server that they need to work with, so there are fewer configuration options.
  • Class libraries don’t have an entry point (program) that gets called when it runs, so there’s no need to specify which version of the .NET runtime to use (no need for host compatibility).

Choosing Which to Use

Class libraries can be used by any application type — they do not limit your choice.

They are the best option if you want to share an assembly across multiple app types (console apps, web applications, desktop applications). Web applications and UWP applications both have a dependency on a framework version. This means that if you have a web project, and a UWP project in the same solution, you cannot use different framework versions for them.

Choosing which framework to target is a trade-off between API availability and speed of deployment. The fewer .NET frameworks you use, the more things that are not available to your application. However, you can deploy it faster.

You can check out this resource to learn more about .NET core PDF generation.

Choosing the Right .NET Core Versions Might Seem Complicated

It’s not nearly as difficult as you might think, though.

The good news is that choosing the one that is best for you is something you can easily accomplish with the above guide. So, keep this in mind if you are struggling to find the right .NET core versions. You can check out the rest of our blog for other useful tech information.