Hello,
I check the references of your project, there are many third-party tools. And some NuGet packages don't support MAUI, for example NuGet Gallery | Rg.Plugins.Popup 2.1.0. Some do not support .net7, for example NuGet Gallery | Xam.Plugin.Media 6.0.2. Please try to remove these packages and try to find if there are other packages that can replace them. Or you could connect the owners to update the package.
As described in the doc - Manually upgrade a Xamarin.Forms app to .NET MAUI - .NET MAUI | Microsoft Learn
If you can't find a .NET 6+ compatible version of a NuGet package you should:
- Recompile the package with .NET TFMs, if you own the code.
- Look for a preview release of a .NET 6+ version of the package.
- Replace the dependency with a .NET 6+ compatible alternative.
In addition, it's recommended that you upgrade the project manually. You could create an empty MAUI project, then copy the file into it.
Update
I have added the styles on App.xaml.cs, but it is not reading.
You could open the App.xaml
file, there a default theme, and all styles can be set in "Resources/Styles/Styles.xaml"
. For more details, please refer to Theme an app - .NET MAUI | Microsoft Learn
Xaml widget names are not reading on Xaml.cs pages.
There might be some other errors in the page.xaml, so the element cannot be read. Or this is a compilation error, you could try to clean the bin/obj folder, re-open VS and re-build the app.
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.