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.
When installing this package, its item is added to the compilation. If a style rule does not match with the code style in the code file, an analysis error might stop compilation.
When installing this package, its item is added to the compilation. If a style rule does not match with the code style in the code file, an analysis error might stop compilation.
To repro, add this to a project's .editorconfig:
(this setting will cause a build error if an accessibility modifier is added which is already the default for it, like adding
internal
to a class).After installing the package, now you'll get the expected build error:
I have learned that this can be avoided by simply adding this to the code files somewhere (near the top?):
// <auto-generated/>
That eliminates the (spurious) error shown above.