If you are getting this error, you are probably using a x64 bit machine. To fix this error, Right-click the project node in Solution Explorer and click Properties. Click on Configuration Properties.Click on Configuration Manager. click on New under Platform and change it to x64 and see if it fixes the problem. If it doesn’t then change the platform to x86.