Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Page Items Error after Upgrading to Version 1.0 Experimental #1209

Closed
ghost1372 opened this issue Aug 10, 2021 · 11 comments
Closed
Assignees

Comments

@ghost1372
Copy link
Contributor

ghost1372 commented Aug 10, 2021

Describe the bug
After Upgrading to Version 1.0 Experimental I get the following error

Error NETSDK1022 Duplicate 'Page' items were included. The .NET SDK includes 'Page' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultPageItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'MainWindow.xaml' App21 C:\Users\Mahdi\.nuget\packages\microsoft.projectreunion.winui\0.8.0\buildTransitive\Microsoft.WinUI.targets 54

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Create a new WinUI 3 Packaged Project
  2. Install a Nuget Package for example (<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.0.3" />)
  3. Compile Project

Expected behavior
Project Should be Compiled without problem

Screenshots

Version Info

NuGet package version:

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)

Additional context

note that The problem arises when a nuget package is installed (i tested in VS 2019 preview and VS 2022 preview)

@ghost1372 ghost1372 changed the title Duplicate Page Items Error after Upgrading to Version 1.0 Exprimental Duplicate Page Items Error after Upgrading to Version 1.0 Experimental Aug 10, 2021
@ghost1372
Copy link
Contributor Author

ghost1372 commented Aug 10, 2021

I think this is because nuget packages are based on
Microsoft.ProjectReunion " Version="0.8.0"
And in the experimental version, these packages have been renamed to
Microsoft.WindowsAppSDK
So is there a solution to using these nuget packages? Or should we wait for them to update?
Can a Visual Studio update solve this problem? If yes, it is better to report this problem to the VS team as soon as possible

@andrewleader
Copy link
Contributor

Thanks for filing this @ghost1372. I think you'll need to wait for the NuGet packages you're using to update to the new WindowsAppSDK NuGet package. This is definitely a pain, but this rename was coming regardless and would be painful no matter what, so that's why we're trying to start early to give everyone time to update to the new package!

We'll work with our ecosystem partners to try to get these other libraries updated!

@JanRajnoha
Copy link

@ghost1372 Could you please report bug into Community toolkit?

@ghost1372
Copy link
Contributor Author

@JanRajnoha Done

@andrewleader andrewleader self-assigned this Aug 12, 2021
@MarkBrainfire
Copy link

MarkBrainfire commented Sep 15, 2021

After updating to Microsoft.WindowsAppSDK (1.0.0-experimental1) I get the same "Duplicate 'Page' items ..." error IF AND ONLY IF I also install Syncfusion.Grid.WinUI Nuget package (19.2.0.62) which has a dependency on Microsoft.ProjectReunion (0.8.1).

@andrewleader
Copy link
Contributor

@MikeHillberg do you think this is XAML related (duplicate 'Page' items)? If we have this problem every time we rev a new version, it seems like having community libraries will be unfeasible since community libraries definitely aren't going to keep up-to-date with the latest library.

@capegreg
Copy link

This is not only with Experimental version. I am using Project Reunion 0.8.4.5305616. I created a new C# App (WinUI 3 in Desktop) project with Windows Template Studio. The installed packages include:

  • CommunityToolkit.Mvvm 7.0.3
  • CommunityToolkit.WinUI.UI.Controls.DataGrid 7.0.3
  • Microsoft.Extensions.DependencyInjection 5.0.2
  • Microsoft.ProjectReunion (originally 0.8.0, updated to 0.8.5 -- no issues up to here)
  • Microsoft.Xaml.Behaviors.WinUI.Managed (originally 2.0.4, duplicate 'Page' items error received once this was updated to 2.0.5, no change with 2.0.6)

@JanRajnoha
Copy link

@capegreg if you look better at dependencies with Microsoft.Xaml.Beahaviors.WinUI.Managed, so you will notice version 2.0.5 is using Win App SDK 1.0 exp1 and version 2.0.6 is using experiment 2, so if you will upgrade to 2.0.5, you will install Windows App SDK 1.0 too

@capegreg
Copy link

@JanRajnoha Ah, yes. thank you for pointing that out. Do you see any reason why I should not be able to hold at 2.0.4 and proceed with my development, then update again in the future?

@JanRajnoha
Copy link

@capegreg I'm currently using 2.0.4 and don't see ane reason to upgrade... For now, but with winui 1.0 I want to upgrade, but current working version is okay

@ghost1372
Copy link
Contributor Author

ghost1372 commented Oct 29, 2021

WCT 7.1.1-preview3 released based on WASDK 1.0.0-preview3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants