Ark.Tools v6.0 is a major release focusing on modernization, performance, and trimming support for .NET applications. This release includes breaking changes that require migration from v5.
- Multi-targeting: .NET 8.0 LTS and .NET 10.0
- Full support for latest .NET features and performance improvements
- Requires .NET SDK 10.0.102 (specified in global.json)
- 100% Trimmable Libraries: All 61 Ark.Tools packages are now trim-compatible
- Enables Native AOT compilation for smaller deployment sizes and faster startup
- Reflection-based utilities properly annotated with
RequiresUnreferencedCode - See Trimming Guidelines for details
- SLNX Support: New Visual Studio solution format (
Ark.Tools.slnx) - Central Package Management (CPM): Unified dependency management across solution
- Microsoft Testing Platform v2 (MTPv2): Modern test runner with better performance
- SDK-based SQL Projects: Improved SQL Server project integration
- System.Text.Json is now the default serializer in AspNetCore packages
- Better performance, native trimming support, and source generation capabilities
- Newtonsoft.Json still supported but requires explicit configuration
- Breaking Change:
useNewtonsoftJsonparameter removed from startup classes
- Removed: Synchronous
Execute()methods from all CQRS handlers - Impact: Only async
ExecuteAsync()methods are supported - Migration: Remove sync implementations, make calling code async
- Benefit: Eliminates sync-over-async patterns that cause deadlocks
- Removed: Built-in Newtonsoft.Json support from
Ark.Tools.AspNetCore - Default: System.Text.Json is now the only built-in serializer
- Migration: Either migrate to System.Text.Json or add Newtonsoft.Json manually
- Benefit: Reduced dependencies, better performance, native trimming
- Changed: Generic type parameters for compile-time type safety
- Impact: Extensions property is now strongly typed
- Migration: Use proxy classes (minimal changes) or strongly-typed extensions
- Benefit: IntelliSense support, compile-time errors, better AoT compatibility
- Changed: Default timeout from 0 (infinite) to 30 seconds
- Impact: Long-running queries may timeout
- Migration: Explicitly set
CommandTimeoutfor queries >30 seconds - Benefit: Prevents runaway queries, aligns with SQL Server defaults
- New Requirement: Types used as dictionary keys must be registered
- Impact: Applications targeting .NET 9+ need
TypeDescriptor.RegisterType<T>() - When: Only affects custom types with
TypeConverterAttributeused as dictionary keys - Benefit: Native AOT compatibility, trim-safe type discovery
- Removed Ensure.That: Replaced with built-in null checks and ArgumentNullException.ThrowIfNull
- Removed Nito.AsyncEx.Coordination: Replaced with built-in
AsyncLazy<T>in Core library - Benefits: Fewer dependencies, lighter footprint, modern .NET patterns
- Span Adoption: String operations use
Span<T>andReadOnlySpan<T>for zero-allocation processing - SearchValues: Efficient character/string searching in hot paths (leverages .NET 8 optimization)
- Reduced Allocations: Internal hot path optimizations throughout the codebase
- Improved Throughput: Measurable performance gains in serialization, validation, and parsing
- C# 14 Extension Members:
InvalidOperationException.ThrowIf/ThrowUnlesswith auto-captured condition expressions - ArgumentException Extensions:
ArgumentException.ThrowIf/ThrowUnlessfor cleaner validation code - CallerArgumentExpression: Automatic condition capture in error messages for better debugging
- AwesomeAssertions: Replaces deprecated FluentAssertions
- Reqnroll: Modern BDD framework (Specflow successor)
- MTPv2: Microsoft Testing Platform v2 with better performance and features
- Better IDE Integration: Hot reload, crash dumps, hang dumps, retry support
- Updated .editorconfig: Latest code style rules
- Enhanced Analyzers: .NET analyzers, Meziantou analyzers, VS Threading analyzers
- BannedApi Analyzer: Prevents dangerous patterns like Task.Wait/Result (deadlock prevention)
- EnforceCodeStyleInBuild: Code style violations now fail the build
- ErrorProne.NET: Additional code quality and correctness checks
- NuGet Audit: Automatic vulnerability scanning
- Deterministic Builds: Reproducible build outputs
- Global Usings: Common namespaces implicitly imported
- Implicit Usings: Enabled by default for cleaner code
- Latest Language Version: C# 14 features available
- Nullable Reference Types: Required and enforced throughout
- Updated to latest OpenAPI 3.1 support
- Breaking change in security requirements configuration
- See migration guide for SecurityRequirementsOperationFilter changes
- All packages now support .NET 8.0 and .NET 10.0
- All packages are trimmable (marked with
<IsTrimmable>true</IsTrimmable>) - Central Package Management enabled
- Default to System.Text.Json serialization
- Newtonsoft.Json support requires manual configuration
- Updated to ASP.NET Core 8.0/10.0
- Type-safe extensions with generic parameters
- Backward-compatible proxy classes for non-extension users
- Internal AsyncLazy implementation (no external dependency)
- Review Breaking Changes: Read Migration Guide carefully
- Update Target Framework: Ensure .NET 8.0+ in project files
- Fix CQRS Handlers: Remove synchronous Execute methods
- Handle Serialization: Choose System.Text.Json or configure Newtonsoft.Json
- Update Tests: Migrate to AwesomeAssertions, Reqnroll, MTPv2
- Adopt Modern Tooling (Optional): CPM, SLNX, editorconfig updates
The following changes are adopted in the Ark.ReferenceProject samples but are not required for library users:
- Central Package Management: Manage versions in Directory.Packages.props
- SLNX Format: New solution file format
- MTPv2: Microsoft Testing Platform v2
- Updated Analyzers: Latest code quality rules
These are demonstrated in the samples as best practices but you can adopt them at your own pace.
- Migration Guide: Detailed migration instructions
- Trimming Guidelines: Comprehensive trimming documentation
- Ark.ReferenceProject: Complete example implementation
- README: Getting started guide
Special thanks to all contributors who helped with this major release, particularly in achieving 100% trimming support across all packages.
This release showcases the power of AI-assisted development:
- GitHub Copilot contributed 425 commits (63.5% of all commits since v5.6.0)
- 316,141 lines of code added by Copilot agents (75.9% of total insertions)
- 294,843 lines of code refactored/removed by Copilot agents (86.5% of total deletions)
- Major contributions include: trimming support implementation, performance optimizations, code modernization, and comprehensive testing
The combination of human expertise and AI assistance enabled rapid delivery of this major release while maintaining high code quality.
- Release Date: TBD
- Target Frameworks: .NET 8.0, .NET 10.0
- SDK Version: 10.0.102
- NuGet Packages: Available on nuget.org
For detailed changes and migration instructions, see the Migration Guide.