Using List & Label Assemblies/NuGet Packages With .NET 5

Introduction

If you want to use the List & Label Assemblies/NuGet Packages for .NET 5 in your project, please proceed as described below.

Procedure

Open the corresponding Visual Studio project file (.csproj) in a text editor and change the entry for the TargetFramework as follows, since List & Label can only run on the Windows operating system.

Before:
<TargetFramework>net5.0</TargetFramework>

After:
<TargetFramework>net5.0-windows</TargetFramework>

Otherwise, you will get the following error message when building in Visual Studio:

NETSDK1136: The target platform must be set to Windows (usually by including ‘-windows’ in the TargetFramework property) when using Windows Forms or WPF, or referencing projects or packages that do so.

You can also find further information on this page of Microsoft.