A source code only package which allows you to use .NET'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 the attribute classes as C# source code to your project. Because this code is 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# code 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 majority of the attributes are not included in the .NET Standard 2.1 version, because it already provides these by default.
Please see https://github.com/manuelroemer/Nullable for additional information on how to use this package.
Install-Package Nullable -Version 1.3.0
dotnet add package Nullable --version 1.3.0
<PackageReference Include="Nullable" Version="1.3.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Nullable --version 1.3.0
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nullable:
The .NET runtime for Bebop, a schema-based binary serialization format.
GitHub repositories (36)
Showing the top 5 popular GitHub repositories that depend on Nullable:
Extensible tool for weaving .net assemblies
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Extensions to LINQ to Objects
A library that makes it easier to create beautiful console applications.