After creating a console application to connect to SharePoint through the API, the following error can occur:

The Web application at http://intranet.local 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.

You should change the following two things in the project settings:

– Application -> Target Framework : 3.5 (not 4.0, because SharePoint 2010 does not support that)

– Build -> Platform Target: x64, because SharePoint is 64-bit…