Fixes Obsolete Warnings and NuGet Package Dependency Warnings#2944
Fixes Obsolete Warnings and NuGet Package Dependency Warnings#2944TheCodeTraveler merged 14 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses issue #2943 by fixing camera package versions and resolving obsolete API warnings throughout the .NET MAUI Community Toolkit codebase.
Key Changes:
- Updated Android camera package versions from non-existent 1.5.0/1.11.0 to valid 1.4.2.3/1.10.1.3 versions
- Replaced obsolete
Layout()method calls withArrange()in unit tests - Modernized null-checking patterns using
is not { }syntax
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/CommunityToolkit.Maui.UnitTests/Views/AvatarView/AvatarViewImageTests.cs | Updated Layout() to Arrange() calls (3 occurrences) |
| src/CommunityToolkit.Maui.UnitTests/Services/PopupServiceTests.cs | Improved pattern matching for null checks, removed unused variables, fixed generic type inference |
| src/CommunityToolkit.Maui.UnitTests/Layouts/UniformItemsLayoutTests.cs | Updated Layout() to Arrange() call |
| src/CommunityToolkit.Maui.UnitTests/Layouts/DockLayoutTests.cs | Updated Layout() to Arrange() calls (6 occurrences) |
| src/CommunityToolkit.Maui.UnitTests/ImageSources/GravatarImageSource/GravatarImageSourceTests.cs | Updated Layout() to Arrange() calls (9 occurrences), removed obsolete ImageCell test |
| src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj | Updated xunit package to v3.mtp-v2, updated CodeCoverage version |
| src/CommunityToolkit.Maui.UnitTests/Behaviors/UserStoppedTypingBehaviorTests.cs | Replaced obsolete FocusChangeRequested event with MapFocus API |
| src/CommunityToolkit.Maui.UnitTests/Behaviors/TouchBehaviorTests.cs | Removed unused variable |
| src/CommunityToolkit.Maui.UnitTests/Behaviors/SetFocusOnEntryCompletedTests.cs | Replaced obsolete FocusChangeRequested event with MapFocus API |
| src/CommunityToolkit.Maui.UnitTests/Behaviors/MaxLengthReachedBehaviorTests.cs | Replaced obsolete FocusChangeRequested event with MapFocus API, fixed trailing whitespace |
| src/CommunityToolkit.Maui.UnitTests/Behaviors/MaskedBehaviorTests.cs | Removed obsolete Frame from invalid elements test |
| src/CommunityToolkit.Maui.Core/CommunityToolkit.Maui.Core.csproj | Updated System.Speech to version 10.0.0 |
| src/CommunityToolkit.Maui.Camera/CommunityToolkit.Maui.Camera.csproj | Fixed camera package versions to existing releases |
| src/CommunityToolkit.Maui.Camera/CameraManager.android.cs | Removed unnecessary nullable operators, fixed parameter nullability annotations |
| src/CommunityToolkit.Maui.Analyzers.UnitTests/Verifiers/CSharpCodeFixVerifier`2.cs | Added Xunit using for TestContext API |
| src/CommunityToolkit.Maui.Analyzers.UnitTests/Verifiers/CSharpAnalyzerVerifier`1.cs | Added Xunit using for TestContext API |
| src/CommunityToolkit.Maui.Analyzers.UnitTests/CommunityToolkit.Maui.Analyzers.UnitTests.csproj | Updated xunit package to v3.mtp-v2, removed vulnerability fix package |
| samples/CommunityToolkit.Maui.Sample/Resources/Styles/Styles.xaml | Removed obsolete Frame and ListView styles, removed unused toolkit namespace, fixed Shell property setters |
| samples/CommunityToolkit.Maui.Sample/Pages/Views/Expander/ExpanderPage.xaml | Removed Expander in obsolete ListView example |
c2d2f80 to
70cba5a
Compare
70cba5a to
fb75e94
Compare
|
The camera version warning is still present when I build the toolkit sample app. These warning are a result of transitive dependancies and the specific ones we are up against require a newer unreleased version of Maui and/or these libraries. I believe the warning can be safely ignored. |
I don't see the warning in CI builds and locally as well. Try rebuild the solution. |
|
I cleaned bin/obj folders and build sample app. It continues to show same error in reference to camera libs. Building the camera libs directly does not show the error. Almost any of my personal projects regardless of anything else will also show same error so i am not sure about what specific item is causing it. |
TheCodeTraveler
left a comment
There was a problem hiding this comment.
Thanks Vlad!
Just FYI - I also updated MediaManager.macios.cs to remove the [Obsolete] warning on AVAsset.TracksWithMediaType for iOS 18+ and MacCatalyst 18+
Fixes #2943
Fix camera package version, fix obsolete warnings