You can experience some “beginners” troubles when you create your “test something in Sharepoint” first console application with new Visual Studio 2010. You will not be able to build project unless you do some changes:
After you added Reference to Microsoft.Sharepoint.dll (which you will find only by browsing to c:program filescommon filesmicrosoft sharedweb server extensions14isapi) you can start programming with Sharepoint API but when you try to run your app, you will get compilation error.
To solve it:
Right click project, select Properties.
Under Build section change Target platform to 64 bit.
Now, try to run your app again.