Installing the SDK and including the libraries to a project using NuGet

In Visual Studio, update your NuGet to latest version. Tools menu > Library Package Manager > Package Manager Console. Type the command NuGet Update -self in the package manager console window, opened at the bottom of Visual Studio. If you do not have the command line NuGet installed, you can install it by typing command install-package nuget.commandline in the Package Manager Console.

In Visual Studio, start NuGet package manager: Tools menu > Library Package Manager > Manage NuGet Packages for Solution…

In the search box, type “Nokia Imaging SDK”.  The SDK entry will be displayed.  Click the install button associated with the entry.

NuGet will install the libraries in the right directories, but a few steps need to be performed manually to complete the installation.

When you add the Nokia Imaging SDK references to your project, special attention must be granted to the target architecture: the ARM library must be used on the package that will be installed on the phone, while the X86 library must be used for the application that will run on the emulator.

First, the “All CPU” configuration must be removed from the project, to leave only “ARM” and “X86”. This is achieved by opening the Configuration Manager, from the Build menu.

In the configuration manager, pull down the “Active solution platforms” list, and select “<Edit…>”:

In the Edit Solution Platforms window, Select “Any CPU” and “Remove”. Only “ARM” and “x86” should remain in the list of solution platforms.

Save the project, close visual studio and re-open it again, so that all the library files will appear in the references. The project will now properly compile and deploy on the emulator as well as on the phone.

The library files

Once the Nokia Imaging SDK is installed, the following directory structure will be available on your disk:

The Nokia.Graphics.Imaging library contains the core functionality of the Nokia Imaging SDK:  all the image filters, as well as the JPEG encoder and decoder. The base library is a Windows Phone Runtime library and can be used from either managed or native code.  The other library, Nokia.Graphics.Imaging.Managed, contains helper methods to simplify the use of the library when working on managed (C#) code. Nokia.InteropServices.WindowsRuntime library contains a single class which is used only internally. When developing in C#, all the libraries should be referenced.

Notice that the Nokia.Graphics.Imaging and the Nokia.InteropServices.WindowsRuntime libraries are presented twice in the directory structure. This is because both libraries have two versions: one version is optimised for the emulator (x86 architecture), and the other version for the phone (ARM architecture).

Parent topic: Nokia Imaging SDK