Every time when I created a console app in vs 2010 for SharePoint, I got this error when I built.
The solution is simple, nothing wrong with the references or dll. Just need to change the .Net Framework to 3.5
Here is how to resolve.
- Open up Solution Explorer and go to the Applications Tab.
- The target Application Framework will be set to “.Net Framework 3.5 Client Profile”, change this to just “.Net Framework 3.5”.
- Click “Yes” to the pop-up.
- Open the build section and change the framework to x64.