A source code only package which allows you to use .NET Core 3.0's new nullable attributes in older target frameworks like .NET Standard 2.0 or the "old" .NET Framework.
This package does not contain any compiled binaries, but instead adds a single C# file with the attribute classes to your project. Because this C# file gets compiled together with the rest of your code, the built binaries will not have a dependency on this package, meaning that you can perfectly use it for both libraries and applications.
The C# file is only included if you are targeting a framework version which does not support the new nullable attributes. For example, if you create a library which multi-targets .NET Standard 2.0 and 2.1, the file is only included in the .NET Standard 2.0 version, because .NET Standard 2.1 already provides the nullable attributes by default.
Please see https://github.com/manuelroemer/Nullable for additional information on how to use this package.
Install-Package Nullable -Version 1.1.1
dotnet add package Nullable --version 1.1.1
<PackageReference Include="Nullable" Version="1.1.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Nullable --version 1.1.1
This package has no dependencies.
Showing the top 6 GitHub repositories that depend on Nullable:
The ultimate dirty YouTube library
Wrapper for command line interfaces
Declarative framework for building command line interfaces
Adds EntityFramework Core IQueryable support to GraphQL
Unopinionated auto-update framework for desktop applications