Skip to content

[BUG] Toolkit warning when targeting net9.0 - Analyzers issue #2621

@IeuanWalker

Description

@IeuanWalker

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

Getting a warning when setting up the MAUI project to work with a unit test project -

Image

Followed MS docs for adding a unit test project - https://learn.microsoft.com/en-us/dotnet/maui/deployment/unit-testing?view=net-maui-9.0
When i updated the TargetFrameworks i get the warning -

<TargetFrameworks>net9.0;net9.0-android;net9.0-ios</TargetFrameworks>

Tried using a preprocessor directives, but then get an error -
Image

Expected Behavior

No warning for the base .net target framework

Steps To Reproduce

Update target frameworks of the app project -

 <TargetFrameworks>net9.0;net9.0-android;net9.0-ios</TargetFrameworks>

Link to public reproduction project repository

https://github.com/IeuanWalker/ToolkitAnalyzers

Environment

- .NET MAUI CommunityToolkit:11.1.0
- OS: Windows
- .NET MAUI: 9.0.30

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions