Skip to content

Fixes Obsolete Warnings and NuGet Package Dependency Warnings#2944

Merged
TheCodeTraveler merged 14 commits intomainfrom
fix/2943-fix-obsolete
Nov 16, 2025
Merged

Fixes Obsolete Warnings and NuGet Package Dependency Warnings#2944
TheCodeTraveler merged 14 commits intomainfrom
fix/2943-fix-obsolete

Conversation

@VladislavAntonyuk
Copy link
Contributor

Fixes #2943
Fix camera package version, fix obsolete warnings

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 with Arrange() 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

Fix camera package version, fix obsolete warnings
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

@ne0rrmatrix
Copy link
Member

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.

@VladislavAntonyuk
Copy link
Contributor Author

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.

@ne0rrmatrix
Copy link
Member

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.

Copilot AI review requested due to automatic review settings November 16, 2025 21:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@TheCodeTraveler TheCodeTraveler changed the title Fixes #2943 Fixes Obsolete Warnings and NuGet Package Dependency Warnings Nov 16, 2025
Copy link
Collaborator

@TheCodeTraveler TheCodeTraveler left a comment

Choose a reason for hiding this comment

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

Thanks Vlad!

Just FYI - I also updated MediaManager.macios.cs to remove the [Obsolete] warning on AVAsset.TracksWithMediaType for iOS 18+ and MacCatalyst 18+

Copilot AI review requested due to automatic review settings November 16, 2025 21:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings November 16, 2025 21:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings November 16, 2025 22:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@TheCodeTraveler TheCodeTraveler merged commit fd8e3e2 into main Nov 16, 2025
9 of 11 checks passed
@TheCodeTraveler TheCodeTraveler deleted the fix/2943-fix-obsolete branch November 16, 2025 22:27
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] warning NU1608 on adding CommunityToolkit.Maui.Camera in .NET 10

4 participants