Showing posts with label SharePoint Object Model 2010. Show all posts
Showing posts with label SharePoint Object Model 2010. Show all posts

Saturday, September 5, 2009

SharePoint Client Object Model fails in VS2010

I found one strange behavior with VS2010 and MOSS 2010. When I tried to run Object Model from console application to access MOSS2010 application, I found it failed by raising an exception



After analysis I found it is a bug in VS2010 Console/Web Template, it fails to run object model with Target Framework 4.0 and Platform target x86/x64. So the solution to this is change Target Framework to 3.5 and Platform Target to “Any CPU” on project properties page.
If anyone still struggles, ref: FileNotFoundException