I just downloaded OpenNI 2 SDK (www.openni.org) and I am trying to setup a project in Visual Studio 2012. What I did:
you also need to point to the actual library file: openni2.lib
openni2.lib