Share via

Xamarin to MAUI: When setting <UseMaui>true</UseMaui> in csproj, my xaml.cs files are removed

Franklin 11 Reputation points
2023-05-24T15:02:51.5066667+00:00

Within the csproj file, when setting the tag <UseMaui>true</UseMaui>, all xaml.cs files that were used with Xamarin are removed. When setting <UseMaui>false</UseMaui> all xaml.cs files are returned.

This happens when using the upgrade assistant or doing the migration manually.

Developer technologies | .NET | .NET Multi-platform App UI
Developer technologies | XAML
Developer technologies | XAML

A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.


1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 84,061 Reputation points
    2023-05-30T16:02:05.02+00:00

    MAUI runs on the .net 6 or net 7 runtime. Xamarin forms run on a custom mono runtime. So a particular app needs to be one or the other. You can not use Xarmarin forms with a Maui app, they must be upgraded to Maui forms.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.