ms-iot/lightning

Name: lightning

Owner: ms-iot

Description: null

Created: 2015-09-29 18:27:30.0

Updated: 2018-05-15 20:54:21.0

Pushed: 2018-02-14 18:28:31.0

Homepage: null

Size: 1397

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Microsoft.IoT.Lightning Nuget package

This repository is for generating the Microsoft.IoT.Lightning Nuget package. This package contains code which is compiled into an application deployed to a board running Microsoft Windows IoT Core.

Also, the nuget package is periodically published to nuget.org. For more information on installing the published nuget package, please refer to https://www.nuget.org/packages/Microsoft.IoT.Lightning/

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Build the Nuget package
ithub\lightning>build.cmd
ithub\lightning\Nuget>build-nupkg.cmd
Set Nuget package source location

In order to install Nuget packages from your local builds, you'll need to add the folder where the Nuget package has been created (or copied) to the list of nuget package manager sources in Visual Studio. Following the below instructions for each sdk source:

In Visual Studio 2017, nativate to Tools -> Library Package Manager -> Package Manager Settings

Package Config

  1. Click the “+” button to add a new source
  2. Set the name to something descriptive
  3. Click the “…” button and navigate to your local folder where the Nuget package has been created; e.g. F:\Github\lightning\Nuget
  4. Click the “Update” button to save the Package Sources changes
Including prerelease Lightning packages

In order to install the latest prerelease version of Lightning as well as receive prerelease updates to the Lightning package, make sure to set the “Include prerelease” option in the Nuget Package Manager.

Package Config

  1. Right click References in your project
  2. Click “Manager Nuget Packages…”
  3. Select package sources for Lightning nuget
  4. Click “Include prerelease”.
  5. Click “Install” to install the nuget package to your project
Add required UWP Extensions

The IOT and Desktop UWP SDK Extensions are both required for building Lightning applications.

Package Config

  1. Right click “References” in your Visual C++ UWP Project
  2. Choose “Add Reference…”
  3. Open Universal Windows | Extensions
  4. Choose Both “Windows Desktop Extensions for the UWP” and “Windows IoT Extensions for the UWP”.
Update Application Package manifest

Also, you need to update the Application Package manifest manually to reference the Lightning device interface.

Package Config

  1. Right click “Package.appxmanifest” in your Visual C++ UWP Project
  2. Click “Open With..”
  3. In the “Open With” dialog box, choose XML (Text) Editor and click OK
  4. Edit the the Capabilities section in your application to add the following:
    :Capability Name="lowLevelDevices" />
    iceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141"/>
    
  5. The first is a capability that will enable the application to access custom devices.
  6. The second is the device guid id for the Lightning interface
  7. Save the file

Build your project to verify all prerequisites to use Lightning were successfully added.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.