Search code examples
xamarin.formswinui-3windows-app-sdkxamarin-essentials

Is it possible to reference Xamarin Forms from Win UI 3 project?


The title says it all.

I tried by adding Xamarin forms NuGet reference in the WinUI3 project, but this cased the project to stop compiling and giving the below error. Obviously the above breaks the build.

enter image description here

So, is there a way to reference Xamarin forms and use some of its references like Xamarin essentials in a WinUI 3 project?

I tried by adding Xamarin forms NuGet reference in the WinUI3 project, giving the error.


Solution

  • I agree with Simon, you should use MAUI. Your existing Xamarin.Forms UWP project can be updated to an SDK-style project for a .NET MAUI WinUI 3 app.

    I suggest you could refer to the Doc: Xamarin.Forms UWP project migration