When you come across this compiling error in Visual Studio, you could re-save the source file with “Advanced Save Options” setting. To address this issue, switch to “File“->”Advanced Save Options“, Select “Window (CR CF)” from the “Line endings” item, select on kind of Windows Encoding method from the “Encoding” item. Just as the following diagram. Then re-save them. And please make sure that those source files are open before you do with such setting. Otherwise, they will stay there the same.
From: http://www.cnblogs.com/open-coder/archive/2012/08/24/2653541.html