I’ve recently got into creating NuGet packages, when I had to create one for Elysium Extra. I discovered it was really easy to do too. I’ve just finished creating another one called NotificationsExtensions.Portable and I did in in 5 minutes!
NotificationsExtensions.Portable is a Portable Class Library (PCL) version of other NotificationsExtensions NuGet Packages. It’s used to Create Windows 8.1 or Windows Phone 8.1 Tile, Toast and Badge Notification XML. This package is intended for use, instead of or as well as the following NuGet packages:
Tile, Toast and Badge Templates
This project helps to create XML representing Tile, Toast and Badge notifications on the Windows 8.1 and Windows Phone 8.1 platforms. You can take a look at the template catalogue to see the types of templates available on these platforms.
Why is this Useful?
It’s useful when trying to send notifications from the server side using Azure Mobile Services .NET Backend or some other .NET based push notification. When you want to create notification XML in a standard .NET project and not a WinRT project. I personally use it for my London Travel Live and Currency Converter Pro apps.
NotificationsExtensions.Portable is available on NuGet. Simply follow the instructions below:
- Click Tools Menu Item in Visual Studio
- Click NuGet Package Manager
- Click Package Manager Console
- Select Your Project in the Package Manager Console
- Execute the following command to install NotificationsExtensions.Portable:
PM> Install-Package NotificationsExtensions.Portable -Version 1.0.0
Attribution and Changes Made
All praise goes to the above two projects and the Microsoft developers who built them. The only changes I made to the code was to switch from XmlDocument to XDocument, remove a few WinRT specific references and stick it into a Portable Class Library (PCL).