Windowscommunitytoolkit: The NotificationsVisualizerLibrary NuGet package breaks the app build (on 17763, both Debug and Release)

Created on 17 Mar 2019  Â·  8Comments  Â·  Source: windows-toolkit/WindowsCommunityToolkit

I'm submitting a...


  • Bug report (I searched for similar issues and did not find one)



NOTE: this isn't directly related to the UWP Toolkit, but this was the closest MS-owned repo on GitHub I could find to open an issue about this.
Feel free to close this and let me know if there's someplace better to post this, I really just wanted any MS engineer working in this area to know about this.

Current behavior


Referencing the NotificationsVisualizerLibrary NuGet package (this one) immediately break the app build, both in Debug and Release mode. I've tested this in two different apps (one of those was a completely blank UWP apps) targeting W10 17763. As soon as the package is referenced, the app build fails with this error:

'GenerateAppxManifest' failed. An item with the same key has already been added.

Expected behavior


The app should build just fine (like the UWP Toolkit sample app does, which uses this package as well).

Minimal reproduction of the problem with instructions


• Create a blank UWP app targeting the SDK 17763 (both minimum and target)
• Add the NotificationsVisualizerLibrary NuGet package
• Try to build the app

Environment

Nuget Package(s): `NotificationsVisualizerLibrary`

Package Version(s): 1.0.5

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [X] October 2018 Update (17763)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [X] October 2018 Update (17763)
- [ ] Insider Build (xxxxx)

Device form factor:
- [X] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [X] 2017 (version: 15.9.9)
- [ ] 2017 Preview (version: )

bug help wanted

All 8 comments

Thanks @Sergio0694 for reporting this issue. As you pointed out this code isn't owned by us. It looks like the package owner hasn't made any updates in a couple of years either, so it's entirely possible that the new SDK breaking the package is expected.

Since the project site is a blog, I'm not too sure what the project structure for that library was or where the code might be as the blog is no longer available except through a cache.

I've got a mail out to try and track down the current owner (if one) and code, so we can figure out what a next possible step is.

Hey @Sergio0694, I'm the owner of the NotificationsVisualizerLibrary.

Strange that the new SDK seems to have broke it! I'll take a look today and see if it can be fixed easily.

@michael-hawker @andrewleader Wow this was fast, thank you both for your help! 😊
Looking forward to any news about this!

Hey @Sergio0694, I'm unable to repro this issue. Here's the steps I took...

  1. Created new blank UWP project
  2. Selected target SDK=17763 and min SDK 17763
  3. Referenced the existing 1.0.5 NotificationsVisualizerLibrary from NuGet
  4. Built the app
  5. Deployed the app

I'm on VS 15.8.7, so a bit older than yours. Strange that the newer version of VS might be causing it! I'll try updating.

@andrewleader Huh, that's weird - I've tested on another machine just to be extra sure and I can confirm that at least here on my side the build is throwing that error as soon as I reference the NuGet package 🤔

EDIT: tried both with the .NETCore.UWP packages version 6.1.9 and 6.2.3 to see if that could help, I get the same error in both cases.

Weird, I just tried on a new machine that had a fresh install of Visual Studio (15.9.9), and it worked fine for me! The proejct had .NETCore.UWP 6.2.7 installed by default, but even downgrading to 6.1.9, it still builds successfully for me.

The only other difference in our setups is that I'm using Insider builds of newer versions of Windows, but that seems even less likely to cause the problem.

Could you try uploading your repro project to GitHub or somewhere so I can try cloning it and see if I run into the issue?

Also try deleting your bin and obj folders and building again. The error your seeing seems to be talked about some here. Maybe it's a bug in Visual Studio? I'm at a loss here :/ I wish I could just repro your issue! haha.

Hi @Sergio0694 I also tried replicating your issue unsuccessfully, I'm currently on build 17763 and VS 15.9.9, I set 17763 as max and min target and referenced _NotificationsVisualizerLibrary_ v1.0.5.
From what I've read this issue can be simple solved as the appxpackagegenerator is not recognizing any changes in between your last build version with the new one, generally a simple Clean and rebuild does it for me when i find this issue.

If that doesn't solve it, I've had a similar issues when referencing a new library last month, it was only solved after deleting the whole .nuget folder from the user folder and reinstalling VS. Maybe this could help you.

Hi, thank you both for your help!
You're definitely right, this was probably just caused by that known VS bug that you've already mentioned.
I've installed VS2019 and tried to add the package from there, and I could finally build and run the app even after referencing it 😄

I'm sorry I wasted your time with this issue, I honestly thought this could be related to the package itself, since it was happening on two different devices for me.
I really appreciate you guys taking the time to help!
Cheers!

P.S.
@andrewleader the package is pretty easy to use and works great, great job there! 😊

Was this page helpful?
0 / 5 - 0 ratings