You are developing a console application referencing Microsoft.SharePoint.dll and trying to connect to a SharePoint resource for e.g., site collection, web, list, or list item. The code compiles without any problem but when you try to run your application, you get the following exception:
Out of many reasons why you would get this message, one main reason is you forgot to change the platform target to 64-bit in your project properties. Change the platform target to 64-bit and then try to run your application and it should run fine this time. Remember, SharePoint 2010 is a 64-bit platform so none of the x86 based settings or application would work with SharePoint 2010
No comments:
Post a Comment