.NET Standard: Getting Started

In this course you'll learn how to write class libraries that target .NET Standard, so that your class libraries can be shared across different .NET platforms like .NET Framework, .NET Core, and Xamarin.
Course info
Rating
(63)
Level
Intermediate
Updated
May 14, 2018
Duration
2h 44m
Table of contents
Course Overview
Building a .NET Standard Library
Choosing the Right Version for Your Library
Understanding How .NET Standard Works
Referencing .NET Framework Libraries in .NET Standard
Migrating .NET Framework Libraries to .NET Standard
Using Platform Specific Code with Multi-targeting
Generating a NuGet Package for Your Library
Description
Course info
Rating
(63)
Level
Intermediate
Updated
May 14, 2018
Duration
2h 44m
Description

At the core of developing a class library that can be shared across different .NET platforms, like .NET Core, .NET Framework, and Xamarin, is a thorough knowledge of .NET Standard. In this course, .NET Standard: Getting Started, you'll learn the skills you need to build class libraries with .NET Standard. First, you’ll learn the basics about the different .NET platforms and .NET Standard. Next, you'll explore the different versions of .NET Standard and you’ll learn how your .NET Standard library works behind the scenes. Finally, you’ll discover how to migrate your existing code from .NET Framework to .NET Standard and how to package your libraries with NuGet. When you’re finished with this course, you’ll have a foundational knowledge of .NET Standard that will help you immensely as you move forward to build your own class libraries that can be shared across different .NET platforms.

About the author
About the author

Thomas is a well-known author, software developer, and speaker from Germany. He specializes in .NET, C#, TypeScript, XAML, and Azure.

More from the author
More courses by Thomas Claudius Huber
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone. My name is Thomas Claudius Huber, and welcome to my course,. NET Standard: Getting Started. I am a software developer, and I have a passion for building professional applications with. NET and C#. This course is an introduction to. NET Standard. . NET Standard is a specification that allows you to write class libraries that can be used on different. NET platforms like. NET Framework,. NET Core or Xamarin. Some of the major topics that we will cover include building a. NET Standard class library and use it in a. NET Framework and also in a. NET Core application, targeting a. NET Standard version with your class library project and understanding the versioning of. NET Standard, migrating class libraries from. NET Framework to. NET Standard, writing platform-specific code in your class library project by targeting multiple frameworks, and generating a NuGet package for your class library to share it with other developers. By the end of this course, you will know how to build professional class libraries for different. NET platforms with. NET Standard and C#. Before beginning the course, you should be familiar with the C# programming language. No prior experience with. NET Standard is required. I hope you will join me on this journey to learn about building. NET Standard class libraries with the. NET Standard: Getting Started course at Pluralsight.

Building a .NET Standard Library
Welcome to the course. NET Standard: Getting Started. My name is Thomas Claudius Huber, and in this course, you will learn how to use. NET Standard to build class libraries that you can use with different. NET platforms like. NET Framework,. NET Core, and Xamarin. In this very first module, Building a. NET Standard Library, you will learn the basics about the different. NET platforms,. NET Framework,. NET Core, and Xamarin. After you are familiar with the. NET platforms, we will answer the question, what is. NET Standard? So, you see, no previous knowledge of. NET Standard is needed to start this course. We will start from scratch. You will learn what. NET Standard is and how you can use it to build class libraries for the different. NET platforms. After you have gained the basic knowledge of. NET Standard, you will learn about the Wired Brain Coffee scenario that we will use throughout this course. In this first module, we will start with the scenario and you will learn how to create a. NET Standard library that contains a CoffeeMachine class that simulates a coffee machine. You will reference this library from a. NET Core application, and also from a. NET Framework application. Throughout the course, we will extend the Wired Brain Coffee scenario, and you will add more and more features to your. NET Standard library. After you are familiar with. NET Standard and with the Wired Brain Coffee scenario, I will show you the course outline. Now let's start and let's ensure that you understand the basics about the different. NET platforms.

Choosing the Right Version for Your Library
Welcome to the module, Choosing the Right Version for Your Library. My name is Thomas Claudius Huber. In this module, you will learn about the different. NET Standard versions and how to choose the right version for your class library project. Let's take a look at the module outline. At the beginning of this module, we ensure that you understand the versioning of. NET standard. Then you will learn how to target a specific. NET Standard version in your class library project. Next, I will show you how you can find out which. NET Standard version a. NET platform implements. Finally, you will learn in this module how to browse the APIs of a specific. NET Standard version. Now let's start and let's look at the versioning of. NET Standard.

Understanding How .NET Standard Works
Welcome to the module, Understanding How. NET Standard Works. My name is Thomas Claudius Huber, and in this module, you will learn how. NET Standard works under the hood. Let me show you the module outline. In the first part of this module, we ensure that you understand how your. NET Standard library is built. You will learn what happens behind the scenes when you compile your project, which is quite interesting as. NET Standard is a specification and not a concrete. NET platform. After I show you how your library is built, you will learn how your library works on a concrete. NET platform like. NET Core or. NET Framework. Besides these insights, you will learn in this module also about the. NET Standard 2. 0 support in. NET framework 4. 6. 1. . NET Framework 4. 6. 1 is special as it implements. NET Standard 1. 4 natively, but supports. NET Standard 2. 0 when you use the. NET Core 2. 0 SDK or a later SDK. Now let's start and let me show you how your. NET Standard library is built.

Referencing .NET Framework Libraries in .NET Standard
Welcome to the module, Referencing. NET Framework Libraries in. NET Standard. My name is Thomas Claudius Huber, and in this module, you will learn about a feature that was introduced with. NET Standard 2. 0 that is called the. NET Framework compatibility shim. It allows you to reference full. NET Framework class libraries from your. NET Standard 2. 0 class library. Let's take a look at the module outline. We start this module by looking at a new requirement of the Wired Brain Coffee company. They want to save the state of a simulated coffee machine. When they restart an app that simulates a coffee machine, the CappuccinoCounter should not always start from 0 again. Instead, it should be restored to the previous state that existed when the application was used the last time. You will find an existing. NET Framework class library that has the functionality you need to store the state of a coffee machine, so you will learn in this module that you can reference that. NET Framework class library in your. NET Standard 2. 0 class library. Besides just referencing the. NET Framework class library, you will also learn how that feature that is called the. NET Framework compatibility shim works under the hood. After you learn these details, I will show you what happens when you call APIs of the. NET Framework class library that are not part of. NET Standard 2. 0. At the end of this module, you will learn how to analyze your existing. NET Framework projects with a. NET Portability Analyzer. That's a tool to find out if your. NET Framework class library is using APIs that are not part of. NET Standard 2. 0. Now let's start, and let's look at the new requirement of the Wired Brain Coffee company to save the state of a simulated coffee machine.

Migrating .NET Framework Libraries to .NET Standard
Welcome to the module Migrating. NET Framework Libraries to. NET Standard. My name is Thomas Claudius Huber. In the previous module, you learned that you can reference. NET Framework class libraries in your. NET Standard 2. 0 class library. In this module, I will show you how to migrate a. NET Framework class library to. NET Standard. Let's take a look at the module outline. First we will ensure that you understand when it makes sense to migrate your. NET Framework class library to. NET Standard. Then you will learn how to do the migration. You will migrate the WiredBrainCoffee. Storage class library, which is a. NET Framework class library, to. NET Standard. After this migration, you will see that the. NET Framework WPF project has issues to restore NuGet packages. You will learn to restore NuGet packages via package reference in the. NET Framework WPF project to solve this problem. Now let's start and let's take a look at when it makes sense to migrate to. NET Standard.

Using Platform Specific Code with Multi-targeting
Welcome to the module, Using Platform-Specific Code with Multi-targeting. My name is Thomas Claudius Huber, and in this module, you will learn how to target multiple. NET platforms with a single class library project. You can target, for example,. NET Standard and. NET Framework. This allows you to use platform-specific code in your class library project, like, for example, classes that are only available in the. NET Framework, but are not part of. NET Standard. Let's take a look at the module outline. At the beginning of this module, the Wired Brain Coffee company will ask you to bring back the WPF window in the WiredBrainCoffee. Storage class library project. But as you might remember, we commented out the code with the WPF Window in the previous module when we migrated the WiredBrainCoffee. Storage project from. NET Framework to. NET Standard. We did this because the WPF Window is a class that is only available in the. NET framework. It is not part of. NET Standard. In this module, you will learn how to bring back the WPF Window by targeting multiple frameworks with the WiredBrainCoffee. Storage project. You will target. NET Standard 1. 3 and. NET Framework 4. 6. 1. After you did this, we will also ensure that you know the difference between project references and NuGet package references that exist in the WiredBrainCoffee solution. Now let's start and let's bring back the. NET Framework-specific WPF Window.

Generating a NuGet Package for Your Library
Welcome to the module, Generating a NuGet Package for Your Library. My name is Thomas Claudius Huber, and in this module, you will learn how to share the class libraries that you have built in this course by generating NuGet packages. Let's take a look at the module outline. In the first part of this module, you will create a NuGet package for the WiredBrainCoffee. Storage class library. Of course, you could publish this package to nuget. org so that other developers worldwide could install your package in their projects. But instead of nuget. org, we will put the package in a local folder and you will learn how to install it from there in the WiredBrainCoffee. Simulators project. After you have created the NuGet package and installed it in the WiredBrainCoffee. Simulators project, we will take a look at the reference of this multi-targeted NuGet package. With the gained knowledge, we will create a little optimization in the WiredBrainCoffee. Simulators project. After that optimization, you will also create a NuGet package for the WiredBrainCoffee. Simulators library so that other developers can enjoy a simulated coffee machine. Now let's start with a NuGet package for the WiredBrainCoffee. Storage class library.