While developing console applications for SharePoint 2010 in Visual Studio 2010, I face FileNotFoundException when I use SPSite object i.e. using(SPSite site = new SPSite(url)).
System.IO.FileNotFoundException was unhandled
Message=The Web application at http://intranet.maarktech.com could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
Source=Microsoft.SharePoint.
This is because in my Project Properties, Build target platform was set as x86.
When I changed my target platform back to Any CPU, it starts running well.
No comments:
Post a Comment