I was writing a console application using Visual Studio 2012
to use SPWebApplication object of SharePoint 2013.
SPWebApplication webApp = SPWebApplication.Lookup(new Uri(http://c4968397007:3695/));
When I ran the application I was getting the following error
Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable.
How to resolve? In the solution explorer right click on the project and then click on Properties. Click on Build tab. Check whether Platform Target is selected as Any CPU. Make sure Prefer-32 bit is not selected.
After doing these changes I ran the application, it worked fine.

Akash KumharPosted Dec 20, 2017, 2:07 PM
Great.. helpful. thanks for sharing
Rathrola Prem KumarPosted Mar 21, 2017, 11:36 PM
Thanks a lot , found when needed :) :)
shuhaib othayiPosted Jan 8, 2014, 3:43 AM
i am also getting the same error even the Platform Target is selected as Any CPU.. like Satbir Singh told
Satbir SinghPosted Sep 27, 2013, 11:46 AM
hi, I got the same error even my Platform Target is selected as Any CPU and Prefer-32 bit is not selected.