Skip to content

Add dotnet 8 support back to Uno TFMs #274

@Arlodotexe

Description

@Arlodotexe

Background

Raised by

This was raised by Lamparter in the #community-toolkit channel of the Windows App Community Discord.

It looks like CommunityToolkit 8.2.250129-preview2 dropped support for .NET 8 on Uno (WinUI3) multitarget?

Screenshot of TFMs shown on NuGet

Past blockers

The latest version of Uno must run on net9.0 exclusively due to a number of unresolved bugs that prevented us from also running net8.0.

We migrated Uno and Wasdk to net9.0* back in December.

We initially tried to MultiTarget both net8.0 and net9.0 for our Uno targets, since that's what Uno is doing in their packages.

We hit a lot of bugs and pain points upgrading to net9.0. I'll need to gather and consolidate background information on the problems we ran into before first, then we can try the change and do a functional review.

which I spoke to Jerome for a few of them to resolve the issues. At the end of our investigation, I found that we had to stick to net9.0 exclusively because of a bug in net8.0 with transitive asset references.

The decision to drop net8.0 was a combination of a number of things, but ultimately boiled down to several bugs that were fixed in net9.0 but not net8.0.

From Jerome:

This particular item is effectively present twice in your assets, not sure why yet

Could it be that you're including transitive assets manually in the head project?

That would explain why they'd be present twice

I see:

                RelativePath = ConvertersExperiment.Samples/BoolNegationConverterSample#[.{fingerprint}]?.xaml

and

                RelativePath = package_6f0bf04483dfc73bc36197bf7826eedbed63227f/SourceAssets/Converters/samples/BoolNegationConverterSample#[.{fingerprint}]?.xaml

the .NET SDK does not like having twice the same origin file to be mapped to two or more publishable endpoints

It's likely fixed with .NET 9

Uno is not doing anything on that front anymore

That being said, as you're adding transitive assets, we've just published the uno.sdk 5.5.54 and uno.ui/winui 5.5.87 which fix transitive files issues for net9 specifically.

it won't fix your duplicate issue though

Problem

Since net8.0 is LTS, it would be worth revisiting this now that things are put back together and stable again.

Solution

We can try adding net8.0 support back to Uno TFMs, then do a functional evaluation for any unexpected issues we find.

We expect to run into issues here, namely the "Past blockers" listed in the Background above.

Any other blockers encountered while making the source change or evaluating functionality should be documented for posterity and tracking.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions