Skip to content

Conversation

@glennawatson
Copy link
Contributor

@glennawatson glennawatson commented Jan 5, 2026

BREAKING CHANGES:

  1. Removed .NET Standard 2.0 support - minimum target is now net8.0 or net462
  2. Removed RxApp.cs - replaced with RxAppBuilder pattern
  3. Removed PlatformRegistrationManager.cs - replaced with modern builder pattern
  4. Solution file renamed: ReactiveUI.sln → reactiveui.slnx (SLNX format)
  5. Removed polyfill attributes now built into modern .NET:
    • CallerArgumentExpressionAttribute
    • DoesNotReturnIfAttribute - NotNullAttribute - IsExternalInit
  6. Removed platform-specific ComponentModelTypeConverter implementations
  7. Removed legacy DefaultViewLocator.AOT.cs

Migration Guide

.NET Standard 2.0 Removal

Projects targeting .NET Standard 2.0 must upgrade to at least .NET 8.0. ReactiveUI
now requires modern .NET with built-in nullable reference types, init properties,
and AOT attributes.

Before:

  • Supported: netstandard2.0, net462+, net8+
  • Used polyfill attributes for modern C# features

After:

  • Minimum: net8.0 for cross-platform, net462 for Windows-only legacy, net9.0 for maui platforms
  • Uses built-in .NET attributes for nullable/AOT support

RxApp Removal

The static RxApp class has been removed in favor of the builder pattern.

Before:

RxApp.MainThreadScheduler.Schedule(() => { });
RxApp.TaskpoolScheduler.Schedule(() => { });

After:
// Use RxSchedulers for AOT-safe scheduler access
RxSchedulers.MainThreadScheduler.Schedule(() => { });
RxSchedulers.TaskpoolScheduler.Schedule(() => { });

// Or use builder pattern for initialization
var builder = RxAppBuilder.CreateReactiveUIBuilder(resolver)
    .WithCoreServices()
    .BuildApp();

Solution File Renamed

Before: src/ReactiveUI.sln (legacy text format)
After: src/reactiveui.slnx (XML-based format)

Impact:

  • Update CI/CD scripts referencing ReactiveUI.sln → reactiveui.slnx
  • Requires Visual Studio 2022 17.10+ or JetBrains Rider 2024.1+ for IDE support
  • All dotnet CLI commands work identically (no syntax changes)

Major Enhancements

Test Coverage (80%+ achieved)

  • Reorganized test projects for better coverage analysis
  • Removed duplicate/obsolete test projects:
    • ReactiveUI.AOTTests (consolidated into main tests)
    • ReactiveUI.Builder.Tests (consolidated)
    • ReactiveUI.Splat.Tests (functionality moved to core)
    • ReactiveUI.Testing.Tests (consolidated)
  • Fixed intermittent test failures with proper Locator scoping
  • Added comprehensive MAUI activation tests
  • Enhanced builder API tests with WithInstance coverage

AOT Compatibility Improvements

This branch addresses numerous AOT warnings and improves trimming compatibility:

  • Removed reflection-heavy PlatformRegistrationManager
  • Removed ComponentModelTypeConverter (used reflection)
  • Streamlined view locator implementation (removed AOT-specific version)
  • All polyfill attributes removed (used UnconditionalSuppressMessage)
  • Improved DynamicallyAccessedMembers usage throughout codebase

Bug Fixes

  • Nested property binding: Fixed redundant setter calls that caused performance issues and unexpected behavior when binding to nested properties
  • MAUI activation: Resolved activation lifecycle issues in MAUI controls
  • Test flakiness: Fixed race conditions in Locator-dependent tests by introducing LocatorScope pattern

API Enhancements

  • Builder API: Added BuilderMixins with WithInstance pattern for better testability
  • XML Documentation: Comprehensive docs added to:
    • All public interfaces (IActivatableView, IViewFor, etc.)
    • Suspension APIs (ISuspensionHost, ISuspensionDriver)
    • Interaction APIs (IInteraction, IInteractionContext)
    • View locator and activation APIs
  • Usage Examples: Added code examples to public API documentation

Documentation Improvements

Added comprehensive educational documentation (CLAUDE.md, copilot-instructions.md):

SLNX Format Documentation

  • What SLNX is (XML-based solution format, VS 2022 17.10+)
  • Key differences from .sln (structured XML vs proprietary text)
  • IDE compatibility requirements
  • CLI usage (identical to .sln files)

Microsoft Testing Platform (MTP) Documentation

  • What MTP is and why ReactiveUI uses it (modern test platform replacing VSTest)
  • How MTP differs from VSTest (argument syntax, configuration)
  • Configuration files explained (global.json, testconfig.json, Directory.Build.props)
  • Best practices:
    • Never use --no-build flag (causes stale binary issues)
    • Correct argument placement: dotnet test flags BEFORE --, TUnit flags AFTER --
    • How to see Console.WriteLine output (--output Detailed)
    • Non-parallel test execution rationale

Command Reference Improvements

  • Fixed coverage argument placement (--coverage goes BEFORE --)
  • Reorganized command-line flags by tool (dotnet test vs TUnit)
  • Removed contradictory examples (--no-build)
  • All solution references updated to reactiveui.slnx

Key Deletions

  • src/ReactiveUI.sln → migrated to reactiveui.slnx
  • src/ReactiveUI/RxApp.cs → replaced with RxAppBuilder pattern
  • src/ReactiveUI/PlatformRegistrationManager.cs → replaced with builder pattern
  • src/ReactiveUI/RegistrationNamespace.cs → obsolete with new registration approach
  • src/ReactiveUI/Helpers/*.cs → polyfill attributes removed (4 files)
  • src/ReactiveUI/IsExternalInit.cs → built into modern .NET
  • src/ReactiveUI.*/GlobalUsings.cs → removed from Maui/WinUI (2 files)
  • src/ReactiveUI/Platforms/*/ComponentModelTypeConverter.cs → reflection-based, removed (3 files)
  • src/ReactiveUI/View/DefaultViewLocator.AOT.cs → consolidated with main implementation
  • Multiple test projects consolidated (ReactiveUI.AOTTests, Builder.Tests, Splat.Tests, etc.)

Platform Support Matrix

Before:

  • netstandard2.0 (cross-platform)
  • net462, net472, net481 (Windows legacy)
  • net8.0, net9.0, net10.0 (modern)

After:

  • net462, net472, net481 (Windows legacy - minimum for Windows-only projects)
  • net8.0, net9.0, net10.0 (cross-platform minimum)
  • net8.0/9.0/10.0-windows10.0.19041.0 (Windows-specific features)
  • iOS, tvOS, macOS, Android, MAUI targets unchanged

Co-authored-by: Christian Fischerauer [email protected]

… enhance test coverage

  BREAKING CHANGES:

  1. Removed .NET Standard 2.0 support - minimum target is now net6.0
  2. Removed RxApp.cs - replaced with RxAppBuilder pattern
  3. Removed PlatformRegistrationManager.cs - replaced with modern builder pattern
  4. Solution file renamed: ReactiveUI.sln → reactiveui.slnx (SLNX format)
  5. Removed polyfill attributes now built into modern .NET:
     - CallerArgumentExpressionAttribute
     - DoesNotReturnIfAttribute
     - NotNullAttribute
     - IsExternalInit
  6. Removed platform-specific ComponentModelTypeConverter implementations
  7. Removed legacy DefaultViewLocator.AOT.cs

  ## Migration Guide

  ### .NET Standard 2.0 Removal
  Projects targeting .NET Standard 2.0 must upgrade to at least .NET 6.0. ReactiveUI
  now requires modern .NET with built-in nullable reference types, init properties,
  and AOT attributes.

  **Before:**
  - Supported: netstandard2.0, net462+, net6.0+
  - Used polyfill attributes for modern C# features

  **After:**
  - Minimum: net6.0 for cross-platform, net462 for Windows-only legacy
  - Uses built-in .NET attributes for nullable/AOT support

  ### RxApp Removal
  The static RxApp class has been removed in favor of the builder pattern.

  **Before:**
  ```csharp
  RxApp.MainThreadScheduler.Schedule(() => { });
  RxApp.TaskpoolScheduler.Schedule(() => { });

  After:
  // Use RxSchedulers for AOT-safe scheduler access
  RxSchedulers.MainThreadScheduler.Schedule(() => { });
  RxSchedulers.TaskpoolScheduler.Schedule(() => { });

  // Or use builder pattern for initialization
  var builder = RxAppBuilder.CreateReactiveUIBuilder(resolver)
      .WithCoreServices()
      .BuildApp();

  Solution File Renamed

  Before: src/ReactiveUI.sln (legacy text format)
  After: src/reactiveui.slnx (XML-based format)

  Impact:
  - Update CI/CD scripts referencing ReactiveUI.sln → reactiveui.slnx
  - Requires Visual Studio 2022 17.10+ or JetBrains Rider 2024.1+ for IDE support
  - All dotnet CLI commands work identically (no syntax changes)

  Major Enhancements

  Test Coverage (80%+ achieved)

  - Reorganized test projects for better coverage analysis
  - Removed duplicate/obsolete test projects:
    - ReactiveUI.AOTTests (consolidated into main tests)
    - ReactiveUI.Builder.Tests (consolidated)
    - ReactiveUI.Splat.Tests (functionality moved to core)
    - ReactiveUI.Testing.Tests (consolidated)
  - Fixed intermittent test failures with proper Locator scoping
  - Added comprehensive MAUI activation tests
  - Enhanced builder API tests with WithInstance coverage

  AOT Compatibility Improvements

  This branch addresses numerous AOT warnings and improves trimming compatibility:
  - Removed reflection-heavy PlatformRegistrationManager
  - Removed ComponentModelTypeConverter (used reflection)
  - Streamlined view locator implementation (removed AOT-specific version)
  - All polyfill attributes removed (used UnconditionalSuppressMessage)
  - Improved DynamicallyAccessedMembers usage throughout codebase

  Bug Fixes

  - Nested property binding: Fixed redundant setter calls that caused performance
  issues and unexpected behavior when binding to nested properties
  - MAUI activation: Resolved activation lifecycle issues in MAUI controls
  - Test flakiness: Fixed race conditions in Locator-dependent tests by
  introducing LocatorScope pattern

  API Enhancements

  - Builder API: Added BuilderMixins with WithInstance pattern for better testability
  - XML Documentation: Comprehensive docs added to:
    - All public interfaces (IActivatableView, IViewFor, etc.)
    - Suspension APIs (ISuspensionHost, ISuspensionDriver)
    - Interaction APIs (IInteraction, IInteractionContext)
    - View locator and activation APIs
  - Usage Examples: Added code examples to public API documentation

  Documentation Improvements

  Added comprehensive educational documentation (CLAUDE.md, copilot-instructions.md):

  SLNX Format Documentation

  - What SLNX is (XML-based solution format, VS 2022 17.10+)
  - Key differences from .sln (structured XML vs proprietary text)
  - IDE compatibility requirements
  - CLI usage (identical to .sln files)

  Microsoft Testing Platform (MTP) Documentation

  - What MTP is and why ReactiveUI uses it (modern test platform replacing VSTest)
  - How MTP differs from VSTest (argument syntax, configuration)
  - Configuration files explained (global.json, testconfig.json, Directory.Build.props)
  - Best practices:
    - Never use --no-build flag (causes stale binary issues)
    - Correct argument placement: dotnet test flags BEFORE --, TUnit flags AFTER --
    - How to see Console.WriteLine output (--output Detailed)
    - Non-parallel test execution rationale

  Command Reference Improvements

  - Fixed coverage argument placement (--coverage goes BEFORE --)
  - Reorganized command-line flags by tool (dotnet test vs TUnit)
  - Removed contradictory examples (--no-build)
  - All solution references updated to reactiveui.slnx

  Dependency Updates

  - TUnit 1.7.5 → latest (modern testing framework)
  - Verify.TUnit 31.9.2 → 31.9.3 (snapshot testing)
  - Microsoft.Extensions.DependencyModel → v10
  - Roslynator.Analyzers → 4.15.0
  - Syncfusion.MAUI.Toolkit → 1.0.8

  Technical Details

  Files Changed Statistics

  - 819 files changed
  - 59,545 insertions(+)
  - 27,543 deletions(-)

  Key Deletions

  - src/ReactiveUI.sln → migrated to reactiveui.slnx
  - src/ReactiveUI/RxApp.cs → replaced with RxAppBuilder pattern
  - src/ReactiveUI/PlatformRegistrationManager.cs → replaced with builder pattern
  - src/ReactiveUI/RegistrationNamespace.cs → obsolete with new registration approach
  - src/ReactiveUI/Helpers/*.cs → polyfill attributes removed (4 files)
  - src/ReactiveUI/IsExternalInit.cs → built into modern .NET
  - src/ReactiveUI.*/GlobalUsings.cs → removed from Maui/WinUI (2 files)
  - src/ReactiveUI/Platforms/*/ComponentModelTypeConverter.cs → reflection-based, removed (3 files)
  - src/ReactiveUI/View/DefaultViewLocator.AOT.cs → consolidated with main implementation
  - Multiple test projects consolidated (ReactiveUI.AOTTests, Builder.Tests, Splat.Tests, etc.)

  Platform Support Matrix

  Before:
  - netstandard2.0 (cross-platform)
  - net462, net472, net481 (Windows legacy)
  - net6.0, net8.0, net9.0, net10.0 (modern)

  After:
  - net462, net472, net481 (Windows legacy - minimum for Windows-only projects)
  - net6.0, net8.0, net9.0, net10.0 (cross-platform minimum)
  - net8.0/9.0/10.0-windows10.0.19041.0 (Windows-specific features)
  - iOS, tvOS, macOS, Android, MAUI targets unchanged

  Co-authored-by: Christian Fischerauer [email protected]
…yet)

Fixed the converter tests
Use builders in assembly hooks
Copy link
Member

@ChrisPulman ChrisPulman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Offline comments given on feedback

…pe converter tests

Added a new converter state, and registrations in the ReactiveUIBuilder
- Introduced `PlatformConverterAffinityTests` to verify that platform-specific converters have the correct affinity values.
- Updated existing type converter tests to reflect the correct affinity values, changing expected results from 10 to 2 for various converters including Byte, Decimal, Double, Integer, Long, and others.
- Added `WpfLocatorScope` to manage WPF-specific service registrations in tests.
- Refactored `RoutedViewHostTests` and `ViewModelViewHostTests` to utilize `WpfLocatorScope` for better state management during tests.
- Ensured that the `DefaultViewLocatorTests` correctly initializes the reactive UI builder with WPF support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants