Wow, this was really driving me nuts.
I added in my CRM references, then when tried to build the solution I got errors complaining it couldn’t find the references to CRM.
Finally I found out what was causing the problem
I had to go into project propertise and then change the target framework from
“.NET Framework 4 Client Profile”
I finally found the answer here
WHY WHY WHY WHY