Skip to main content
ANcpLua.Roslyn.Utilities provides comprehensive polyfills that enable modern C# features when targeting netstandard2.0. All polyfills are #if-gated and compile only on older target frameworks.

Packages

Two packages include polyfills:

Available Polyfills

Language Features

Nullable Attributes

Trim/AOT Attributes

Index and Range

Other

Opt-Out Control

All polyfills are enabled by default. Use MSBuild properties to opt out:
Polyfills are only active for netstandard2.0 and netstandard2.1 targets. .NET 5+ projects don’t need them — the #if guards ensure they compile away.

Conflict Resolution

If another package provides the same polyfills (e.g., PolySharp), disable the overlapping categories to avoid duplicate type definitions: