CommunityToolkit / CommunityToolkit/Tooling-Windows-Submodule

Add dotnet 8 support back to Uno TFMs

Open
#274 3 comments 1 reaction 1 assignee Claimed by @Arlodotexe View on GitHub
build :fire: enhancement nuget :package: Uno
Dominant language
C#
Stars
55
Forks
19
Avg merge
40m
Merged PRs (30d)
1

Description

# Background

### Raised by

This was raised by Lamparter in the [`#community-toolkit`](https://discord.com/channels/372137812037730304/669640275500466197/1350179520338067546) 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

![](https://cdn.discordapp.com/attachments/669640275500466197/1350179673639882902/image.png?ex=67d5cc4f&is=67d47acf&hm=b7a4852095c9c01a274ef38d07e9362e17687f54400e64a72e0a59521197cc0b&)

### 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*](https://github.com/CommunityToolkit/Tooling-Windows-Submodule/pull/230) 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.

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.