Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to .NET 8 #119

Merged
merged 7 commits into from
Sep 27, 2024
Merged

Update to .NET 8 #119

merged 7 commits into from
Sep 27, 2024

Conversation

janusw
Copy link
Collaborator

@janusw janusw commented Sep 21, 2024

This PR updates Maui.Tabs and MauiSample from .NET 6 to .NET 8 (since .NET MAUI 6 is out of support by now). It fixes all errors I encountered in the process (and a few obsolescence warnings).

It enables me to build the sample again, thereby fixing #115.

IMHO it is also a first step that should be taken before targeting .NET 9, as proposed in #118.

* otherwise the logo and readme are not found
* to fix the error:
  One or more duplicate file names were detected.  All image output filenames must be unique.
* Cannot resolve property "SelectedTabTextColor" on type "MaterialUnderlinedTabItem (property missing or missing accessors)".
@janusw
Copy link
Collaborator Author

janusw commented Sep 21, 2024

Too bad there is no CI here to verify the build ...

(I could contribute some hooks for GitHub Actions, if this is desired.)

@roubachof
Copy link
Owner

Thank you for your proposal, I sent you an invite

@@ -11,7 +11,7 @@

<Style x:Key="MaterialTabStyle" TargetType="tabs:MaterialUnderlinedTabItem">
<Setter Property="SelectedTabColor" Value="{StaticResource Primary}" />
<Setter Property="SelectedTabTextColor" Value="{StaticResource Secondary}" />
<!--<Setter Property="SelectedTabTextColor" Value="{StaticResource Secondary}" />-->
Copy link
Owner

Choose a reason for hiding this comment

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

why is this commented ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To fix a build error:

Cannot resolve property "SelectedTabTextColor"
on type "MaterialUnderlinedTabItem
(property missing or missing accessors)".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

AFAICS the error message is correct, right? SelectedTabTextColor is only available in BottomTabItem, but not in MaterialUnderlinedTabItem (both inherit from TabTextItem, directly or indirectly).
Not sure why this was missed with net6.0. Probably improved diagnostics in net8.0, I guess ...

@janusw
Copy link
Collaborator Author

janusw commented Sep 23, 2024

Too bad there is no CI here to verify the build ...

(I could contribute some hooks for GitHub Actions, if this is desired.)

See
260dd71

@roubachof roubachof merged commit bcc07df into roubachof:main Sep 27, 2024
@roubachof
Copy link
Owner

Thank you so much for this PR !

@roubachof
Copy link
Owner

I guess it fixes #116 right ?

@janusw janusw deleted the net8 branch September 29, 2024 12:38
@janusw
Copy link
Collaborator Author

janusw commented Sep 29, 2024

Thank you so much for this PR !

Thanks for merging!

I guess it fixes #116 right ?

I'm not sure (have not tried it with .NET 9 yet). It sounds like #116 is caused by references to obsoleted code (Device and Frame). I fixed the obsolescence warnings caused by Device, but not those related to Frame (since it is still valid in MAUI 8 and only obsoleted in MAUI 9).

Since Frame is only obsoleted (but not yet removed) in .NET 9, I don' t think it should cause any runtime errors. So the issue might be fixed after all.

@daltzctr Could you please check if this PR fixes #116 for you?

@janusw janusw mentioned this pull request Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants