ANcpLua.Roslyn.Utilities
1.43.0
dotnet add package ANcpLua.Roslyn.Utilities --version 1.43.0
NuGet\Install-Package ANcpLua.Roslyn.Utilities -Version 1.43.0
<PackageReference Include="ANcpLua.Roslyn.Utilities" Version="1.43.0" />
<PackageVersion Include="ANcpLua.Roslyn.Utilities" Version="1.43.0" />
<PackageReference Include="ANcpLua.Roslyn.Utilities" />
paket add ANcpLua.Roslyn.Utilities --version 1.43.0
#r "nuget: ANcpLua.Roslyn.Utilities, 1.43.0"
#:package ANcpLua.Roslyn.Utilities@1.43.0
#addin nuget:?package=ANcpLua.Roslyn.Utilities&version=1.43.0
#tool nuget:?package=ANcpLua.Roslyn.Utilities&version=1.43.0
ANcpLua.Roslyn.Utilities
Utilities for Roslyn analyzers and source generators.
Packages
| Package | Purpose |
|---|---|
ANcpLua.Roslyn.Utilities |
Core utilities (DLL reference) |
ANcpLua.Roslyn.Utilities.Sources |
Source-only package (embeds as internal in analyzers/generators) |
ANcpLua.Roslyn.Utilities.Polyfills |
Source-only polyfills for netstandard2.0 (no Roslyn dependency) |
ANcpLua.Roslyn.Utilities.Testing |
Testing framework for Roslyn tooling |
Installation
# For analyzers/generators (source-only, no runtime dependency)
dotnet add package ANcpLua.Roslyn.Utilities.Sources
# For polyfills only (no Roslyn dependency)
dotnet add package ANcpLua.Roslyn.Utilities.Polyfills
# For runtime reference
dotnet add package ANcpLua.Roslyn.Utilities
# For testing
dotnet add package ANcpLua.Roslyn.Utilities.Testing
Polyfills
The .Polyfills and .Sources packages include polyfills for modern C# features on netstandard2.0:
| Polyfill | What it enables | Opt-out property |
|---|---|---|
Index / Range |
array[^1], array[1..3] syntax |
InjectIndexRangeOnLegacy |
IsExternalInit |
record types and init properties |
InjectIsExternalInitOnLegacy |
| Nullable attributes | [NotNull], [MaybeNull], etc. |
InjectNullabilityAttributesOnLegacy |
| Trim/AOT attributes | [RequiresUnreferencedCode], etc. |
InjectTrimAttributesOnLegacy |
TimeProvider |
Testable time abstraction | InjectTimeProviderPolyfill |
Lock |
System.Threading.Lock polyfill |
InjectLockPolyfill |
| String extensions | string.Contains(StringComparison) |
InjectStringExtensionsPolyfill |
All polyfills are enabled by default. Set any property to false to opt out, or disable all with:
<InjectAllPolyfillsOnLegacy>false</InjectAllPolyfillsOnLegacy>
Documentation
ancplua.mintlify.app/utilities
Related
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 6.0.0)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- Microsoft.CodeAnalysis.Analyzers (>= 3.11.0)
- Microsoft.CodeAnalysis.CSharp (>= 5.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ANcpLua.Roslyn.Utilities:
| Package | Downloads |
|---|---|
|
ANcpLua.Roslyn.Utilities.Testing
Fluent testing framework for Roslyn analyzers, code fixes, and incremental generators with caching validation, forbidden type detection, and comprehensive assertion support. |
|
|
ErrorOrX
Discriminated unions for .NET with fluent error handling. ErrorOr<T> provides railway-oriented programming, nullable-to-ErrorOr extensions (OrNotFound, OrValidation, OrError), Match/Then/Else/Switch/FailIf fluent API, and rich typed errors mapped to HTTP status codes. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.43.0 | 172 | 2/28/2026 |
| 1.42.0 | 199 | 2/28/2026 |
| 1.41.0 | 85 | 2/28/2026 |
| 1.40.0 | 226 | 2/15/2026 |
| 1.39.0 | 153 | 2/14/2026 |
| 1.38.2 | 201 | 2/14/2026 |
| 1.38.1 | 105 | 2/14/2026 |
| 1.38.0 | 96 | 2/14/2026 |
| 1.37.1 | 98 | 2/14/2026 |
| 1.37.0 | 96 | 2/14/2026 |
| 1.36.2 | 95 | 2/14/2026 |
| 1.36.1 | 91 | 2/14/2026 |
| 1.36.0 | 95 | 2/14/2026 |
| 1.35.0 | 96 | 2/14/2026 |
| 1.34.0 | 139 | 2/13/2026 |
| 1.33.0 | 124 | 2/13/2026 |
| 1.32.0 | 96 | 2/13/2026 |
| 1.31.0 | 259 | 2/7/2026 |
| 1.30.2 | 214 | 2/5/2026 |
| 1.30.1 | 104 | 2/4/2026 |