A source code only package which allows you to use .NET's nullable attributes in older target frameworks like .NET Standard 2.0 or the "old" .NET Framework.
This release provides solutions for issue #1 and
issue #6. In addition, potential compiler
warnings in the NullableAttributes.cs file are now hidden.
Upgrading:
Remove any previously defined NULLABLE_ATTRIBUTES_EXCLUDE_FROM_CODE_COVERAGE compiler constant,
as it does not have any effect anymore.
:information_source: Note:
Builds will NOT break if the constant is still defined. It is simply ignored now.
Details:
The package now supports packages.config via a content/ folder in the NuGet package.
The attributes are now excluded from code coverage by default.
When referenced from projects targeting .NET Standard >= 2.0 or .NET Framework >= 4.0, the
ExcludeFromCodeCoverageAttribute is used. For other project types, the DebuggerNonUserCodeAttribute
is used.
Added support for the NULLABLE_ATTRIBUTES_INCLUDE_IN_CODE_COVERAGE compiler constant which
removes the code coverage attributes.
The NULLABLE_ATTRIBUTES_EXCLUDE_FROM_CODE_COVERAGE compiler constant no longer has
any effects. Code coverage is now disabled by default.
The NullableAttributes.cs file now wraps the attributes with a #pragma warning disable and
#pragma warning restore block to disable both compiler- and code-analysis warnings.
v1.2.0
This release provides solutions for issue #1 and issue #6. In addition, potential compiler warnings in the
NullableAttributes.cs
file are now hidden.Upgrading:
Remove any previously defined
NULLABLE_ATTRIBUTES_EXCLUDE_FROM_CODE_COVERAGE
compiler constant, as it does not have any effect anymore.Details:
packages.config
via acontent/
folder in the NuGet package.ExcludeFromCodeCoverageAttribute
is used. For other project types, theDebuggerNonUserCodeAttribute
is used.NULLABLE_ATTRIBUTES_INCLUDE_IN_CODE_COVERAGE
compiler constant which removes the code coverage attributes.NULLABLE_ATTRIBUTES_EXCLUDE_FROM_CODE_COVERAGE
compiler constant no longer has any effects. Code coverage is now disabled by default.NullableAttributes.cs
file now wraps the attributes with a#pragma warning disable
and#pragma warning restore
block to disable both compiler- and code-analysis warnings.