CommunityToolkit / CommunityToolkit/dotnet

[AOT/Trim Support] ObservableRecipient.IsActive does not work

Open
#962 2 comments 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
C#
Stars
3.8k
Forks
400
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

i always use ObservableRecipient and its IsActive property, now it seems that does not support AOT/Trim.

Solution:
i created a new property for this:
[ObservableProperty]
public bool isProcessActive;

![Image](https://github.com/user-attachments/assets/69e57ec3-16ab-4ef7-b2b1-18f1c32f360b)

### Regression

CommunityToolkit.Mvvm 8.3.2

### Steps to reproduce

1. Use ObservableRecipient and IsActive property
2. Run app with PublishTrimmed and AOT

### Expected behavior

Support AOT/Trim

### Screenshots

_No response_

### IDE and version

VS 2022

### IDE version

_No response_

### Nuget packages

- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [x] CommunityToolkit.Mvvm (aka MVVM Toolkit)

### Nuget package version(s)

8.3.2

### Additional context

_No response_

### Help us help you

No, just wanted to report this

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.