This message was posted on behalf of Intel Corporation
Thank you for contacting us.
First of all, we want to know which camera are you using? Can you also tell us the SDK version?
I tested the example that you have provided and it seems that it doesn't work (I tested it using the SDK 2016 R2).
I didn't get the errors that you mentioned, but I think that you are getting those errors because you haven't configured the C# Development Environment (https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_csharp_application.html).
I also noticed that the example uses PXCMEmotion, and the Emotion detection features was removed (Check this: https://software.intel.com/en-us/node/606349), please consider that this code is from 2015, a lot of features have changed, and some old codes shouldn't work.
As a reminder, the SDK includes a lot of samples that are very helpful, and you can access to the source code to learn more about the language.
Have a nice day.