Even setting the build type to release getting above error - cannot open include file ‘afxres.h’
The error seems to generate from ema project because it requires the header file from MFC. As far as I understand, visual studio 2015 default setup does not install Visual C++ MFC package. Therefore you need to modify the Visual Studio 2015 setup and add the MFC .
Please close VS2015 and goto Control Panel->Programs and Features->Microsoft Visual Studio <Professional/Enterprise>->Change->Modify->Add Microsoft Foundation Classes.
Then reopen project and rebuild.
Thanks