Error: Platform not supported exception
Description:
I was writing a console application using Visual Studio 2012 to use SPSite object of SharePoint 2013.When I ran the application I was getting the following error.
Solution:
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.
Description:
I was writing a console application using Visual Studio 2012 to use SPSite object of SharePoint 2013.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.
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.