Microsoft SharePoint is not supported in 32-bit process

Recently while working with the SharePoint server object model inside a windows application, I received the below error. System.PlatformNotSupportedException occurred in Microsoft.SharePoint.dll. An unhandled exception of type ‘System.PlatformNotSupportedException’ occurred in Microsoft.SharePoint.dll. Additional information: Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable.

microsoft sharepoint is not supported in 32-bit process. please verify
microsoft sharepoint is not supported in 32-bit process. please verify

We can work with the SharePoint server object model inside a windows application by adding Microsoft.SharePoint.dll.

Microsoft SharePoint is not supported in 32-bit process

To resolve the issue, Right click on the Project -> Properties.

Then select Build and uncheck Prefer 32-bit option which looks like below.

Please verify that you are running in a 64-bit executable
Please verify that you are running in a 64-bit executable

After this Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable will not appear.

Read some SharePoint server object model tutorials:

I hope this tutorial will be helpful to resolve Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable.

>