0

I have a problem with NuGet Package of NotificationExtensions because it is running fine on my local desktop computer and in the emulators, but when I deploy to a Windows 10 Mobile Device, I get a FileNotFoundException at runtime telling me that it cannot find "NotificationExtensions.Win10". I tried using the standard package for UWP apps as well as the linked portable class library of this package and nothing is working.

The build and deploy process is fine, there are no related errors except for DEP6721: cannot deploy XAML UI Debugger but I don't think that this is related to the actual problem.

The extension is used within a project that runs as a background task, so its project type is set to "Windows Runtime". Maybe this is what the problem is all about?

enter image description here

The project setup is very simple and only uses 2 classes. TileTemplateManager generates the live tile template with the said extension and the TileUpdater uses the generated templates to initiate a tile update.

Of course, I could just get rid of the extension and write the needed XML code into a string or load it from a file but I am really wondering if anyone knows about this problem and can help me with that?

UPDATE: After switching to the official UWP Toolkit, I get the same FileNotFoundException error with this library :(

enter image description here

Bart
  • 9,925
  • 7
  • 47
  • 64
xmashallax
  • 1,673
  • 1
  • 17
  • 34
  • In your project properties, you should have a option that says `Deploy Optional Packages`. Can you try that? – AVK Apr 19 '17 at 22:36
  • Don't see it ... which tab is it in the project properties? The "Build" tab? – xmashallax Apr 19 '17 at 22:47
  • No Its under "Debug" – AVK Apr 20 '17 at 01:42
  • There is no such option in the project properties of the TileUpdater project. There is not even a "Debug" tab. However, in my main start project there is a "Debug" tab but there is nothing that sounds like "Deploy optional Packages". – xmashallax Apr 20 '17 at 10:05
  • 1
    What's the reason you're using that library instead of the official Microsoft.Toolkit.Uwp.Notifications library from Microsoft? The old NotificationsExtension library from Microsoft has been moved into the UWP Community Toolkit since last summer in case you didn't know. (https://blogs.msdn.microsoft.com/tiles_and_toasts/2016/08/19/notificationsextensions-has-moved-to-the-uwp-community-toolkit/) I've been using the old library and the UWP Community Toolkit one since it came out and haven't had any issues. I recommend you try it. – Mentha Suaveolens Apr 20 '17 at 22:37
  • I didn't know that but it's not working...same error. – xmashallax Apr 21 '17 at 16:20
  • make sure you copy DLL to output directory . look in options for the reference – magicandre1981 Apr 22 '17 at 06:03
  • How do I do that? The context menu of the "References" menu doesn't contain an entry like "Options" and if I use "Properties" in the context menu of the said extension, VS just opens the "Properties" window which is empty. – xmashallax Apr 23 '17 at 14:25
  • ok, I checked it for UWP projects there is no way to set this like for other projects. I build a demo app, added the reference , build the appx package and the DLL is included. Remove the package again, add it, clean the solution, next click rebuild and now create new packages and deploy the new appx. also remove the old app from your phone before deploying the new version. – magicandre1981 Apr 24 '17 at 16:45
  • I am not deploying manually, I do a build and then I start debugging with the connected device directly from VS. Anyway I followed your instructions and I get the same error. Sadly, it didn't work... – xmashallax Apr 24 '17 at 19:58
  • if you open the Appx via 7zip, do you see the that the DLL is part of the Appx file? – magicandre1981 Apr 25 '17 at 04:17
  • Yeah, DLL is inside. In fact, there is also the remove NotificationExtensions.dll still inside that isn't part of my solution anymore. – xmashallax Apr 25 '17 at 17:21
  • that's why you should rebuild solution. [Enable DevicePortal on the phone](https://docs.microsoft.com/en-US/windows/uwp/debug-test-perf/device-portal-mobile), on your Dev PC, open browser and open the url that is shown in device portal setting on phone. Go to Performancetracing tab, select "Custom Profile" and [load this profile from my dropbox](https://www.dropbox.com/s/ef9e53shfrmztgh/FieldMedic-Performance_DotNetRT_stack.wprp?dl=0) and click on **Start Trace**. Now try to run your app when you get the error message, click on **Stop Trace**. Now click on the Save button to dl the ETL to PC – magicandre1981 Apr 26 '17 at 14:09
  • now zip this ETL and share the zip via OneDrive share link – magicandre1981 Apr 26 '17 at 14:09
  • Have you generated the ETW trace file or does it work now? – magicandre1981 May 02 '17 at 15:44
  • Did not have any time to try it yet, but will tomorrow :) – xmashallax May 02 '17 at 18:57
  • "Failed to start WPR tracing" ... it's working with the default profile, does that help? – xmashallax May 04 '17 at 18:04
  • no, I need some special events. this is the profile from FieldMedic app, I only added the option to capture callstacks. Which win10 mobile build do you use? I tested it on 15063.251 – magicandre1981 May 09 '17 at 15:12
  • I have 14393.1066, I think it's the latest one my Lumia 830 can get without Insider Program. Tracing still not working with your profile :( – xmashallax May 09 '17 at 20:15
  • I tested it on 14393.1066.armfre.rs1_release_sec.170327-1835 on my 1320 and it works. – magicandre1981 May 10 '17 at 14:56

0 Answers0