Logo

dev-resources.site

for different kinds of informations.

Migrating UWP to Windows App SDK (WinUI 3) with Xamarin Forms Integration

Published at
5/21/2024
Categories
winui3
xamarinforms
syncfusionxamarin
uwp
Author
pooja_54ebc01c7e0
Author
17 person written this
pooja_54ebc01c7e0
open
Migrating UWP to Windows App SDK (WinUI 3) with Xamarin Forms Integration

I'm in the process of migrating my project (MyApp.UWP) from UWP to the Windows App SDK (WinUI 3). I'm following the manual migration process as outlined in the Microsoft documentation - https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/overall-migration-strategy, migrating the project step by step.

My existing UWP project includes Xamarin.Forms references, which I need to incorporate into the WinUI 3 project. However, I am encountering errors such as:

XamlC error XFC0000: Cannot resolve type "Application"
XamlC error XFC0000: Cannot resolve type "Window"

Image description

Solution Structure
My solution consists of three projects:

  1. MyApp: Contains all views and viewmodels.
  2. MyApp.Data: Contains data entities, interfaces, and enums.
  3. MyApp.UWP: The startup project with configuration files, MainPage.xaml, database, and dependency services.

Migration Steps
To migrate, I added a new project named MyApp.WindowsApp. This project will be the new startup project and will need to integrate Xamarin.Forms, Xamarin.Essentials, and Syncfusion Xamarin components. Despite following a step-by-step approach and initially adding minimal dependencies, I'm unable to add the required Xamarin.Forms packages due to the errors mentioned above.

Issues and Request for Assistance
When attempting to add Xamarin.Forms, Xamarin.Essentials, and Syncfusion components to MyApp.WindowsApp, I encounter the XamlC errors. These errors prevent me from proceeding with the integration and setting up MyApp.WindowsApp as the startup project. Specifically, the errors occur when I try to add the NuGet packages for Xamarin.Forms or syncfusion.

Image description

Image description

I would appreciate any guidance on:

How to resolve the XamlC errors related to the "Application" and "Window" types.
The correct way to integrate Xamarin.Forms and related components into a WinUI 3 project.
Best practices for structuring the migration to ensure smooth integration and functionality.

Thank you for your help and insights!

xamarinforms Article's
30 articles in total
Favicon
hi , this isan exampel post
Favicon
Por onde anda o WPF?
Favicon
Modern Home, Filter, and Details Screens for .NET MAUI + MVVM 🎨
Favicon
Modern Inbox and Chat Screens for .NET MAUI + MVVM 🚀
Favicon
Modern Startup Screens for .NET MAUI + MVVM Architecture
Favicon
UI components for MAUI apps
Favicon
De Xamarin.Forms a .NET MAUI: Uma Evolução Que Transcende Limites
Favicon
Building Multi-Page Applications with Xamarin Forms - Tips and Tricks
Favicon
MATADORBET FAST GİRİŞ
Favicon
Is it possible to reference Xamarin Forms from Win UI 3 project?
Favicon
Desvendando o Futuro do Desenvolvimento de Aplicativos com .NET MAUI
Favicon
Migrating UWP to Windows App SDK (WinUI 3) with Xamarin Forms Integration
Favicon
.NET MAUI BorderLessEntry for all platforms
Favicon
Understanding Cross-Platform Development with Xamarin
Favicon
C# Expired Package
Favicon
How to verify OTP in Android without SMS read permission using Xamarin.Forms?
Favicon
I’ve had enough. Bye, Xamarin!
Favicon
بهترین آموزش .NET MAUI فارسی
Favicon
معرفی وب سایت برنامه نویسی کدسل
Favicon
Demystifying MAUI Localization: A Comprehensive Guide for Developers 🌐📚
Favicon
🔒 Introducing Serial Log and Metro Log: Simplifying Your Logging Experience In .NET MAUI! 📝🚇
Favicon
How to Build Mobile Check Capture App with Xamarin.Forms and Dynamsoft Document SDK
Favicon
Incredible App Themes for Xamarin.Forms
Favicon
10 Benefits of Using Xamarin App Development
Favicon
Send emails, with html template, from Xamarin.Forms
Favicon
Just launched my mental health app
Favicon
Migrando Mitawi a .NET MAUI
Favicon
How to Build Mobile Document Scanning App with Xamarin.Forms for Android and iOS
Favicon
Single vs. Multi Page Android App
Favicon
Jenkins with Xamarin.Forms

Featured ones: