Implement Lightning nuget

This change implements the lightning nuget.
It also fixes an API compatibility bug.