In this post we will discuss how to resolve the issue which comes when we try to run a windows application in SharePoint 2016. Recently I was doing a demo in windows application (Server Object Model / Microsoft.SharePoint.dll) in visual studio 2015.
When I run the application it give me an error as:
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.
The error looks like below:
Also you can read:
– Working with Enterprise Metadata and Keywords Settings for List and Document library in SharePoint Online
– Get user permissions for a site using CSOM in SharePoint Online
– How to add navigation link in site settings navigation page SharePoint 2013 using Visual Studio 2013?
To resolve this issue follow below steps:
Right click on the Project -> Properties.
Then in the Properties page, open Build tab and then uncheck “Prefer 32-bit” in Platform target section like below:
Remember SharePoint 2016 support only 64 Bit.
Then you run the application it should working fine.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.