user3912437
user3912437

Reputation: 1

Error adding a WinUI 3 class library reference to a WinUI 3 blank app

First I create a blank Visual Studio Solution, then a add a WinUI3 class library(dll) project and then i add a WinUI3 blank app project. In this stage both the project compile without errors Now I go to the blank app and add a project reference to the class library(dll), but now the blank app does not compile and give error (sorry, translate from portuguese) "Error NETSDK1022 Duplicate 'Page' items were added. The .NET SDK includes 'Page' items from the project directory by default. You can remove these items from the project file or set the 'EnableDefaultPageItems' property to 'false' if you want to explicitly include them in the project file. For more information, check out https://aka.ms/sdkimplicititems. The duplicate items were: 'MainWindow.xaml' XXXXX C:\Users\XXXXX.nuget\packages\microsoft.projectreunion.winui\0.8.12\buildTransitive\Microsoft.WinUI.targets 54"

I already try to add "EnableDefaultCompileItems" as false but does not work. I expected this to work like any WPF or Windows Form example

Upvotes: 0

Views: 262

Answers (1)

Andrew KeepCoding
Andrew KeepCoding

Reputation: 13666

Project Reunion is the previous code name for the Windows App SDK and is outdated. To solve this, you need to remove ProjectReunion packages.

Upvotes: 0

Related Questions