Visual Studio 2010 forgets references when building

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”


“.NET Framework4”

I finally found the answer here


Where has the Add Web Reference button gone in Visual Studio 2010

I was trying to add a web reference in visual studio 2010 this week and it took me a while to find out where Microsoft had hidden the functionality.

Microsoft always have to hide/rename things whenever they do an upgrade.

Instead of web references all I could find was the Add Service, which means going through the hell of trying to set up a WCF connection.  I’m sure WCF is really deep down very good but every time I have had to use it, I have always had connection/setup issues.

Anyway way back to Web References, which if you are using some legacy code then you might well need to use.  I tried adding a the Web Reference url with a ?wsdl on the end but this didn’t return me a normal web reference and it didn’t work in the same way, which basically meant the old code I had wouldn’t work.  So I had to find out how to add a Web Reference.

So go the references folder in Visual studio 2010,

right click and choose Add Service Reference

press the Advanced Button at the bottom left

Now you can finally add in a good old fashioned Web Reference by bashing on the Add Web Reference Button


I borrowed the image from this blog, who also had the same issue.

windows 7 – how to search for words in documents

The new windows 7 search was beginning to drive me a bit bonkers.

it’s quite clever once you understand it but there doesn’t seem to be any help or any easy user interface to search with.

Basically the windows 7 search works using attributes, you put these in the search box with a : after it.

so if you want to search for a file created today you would put in



or a file containing the word hosk

content: hosk


it’s taken me ages to find the search syntax


Search syntax

Property Example Function
author:name author:patrick Finds items with patrick in the Author property.
author:(name) author:(patrick hines) Finds items with patrick hines in the Author property.
author:(name OR name) author:(patrick OR bob) Finds items with patrick or bob in the Author property.
author:name name author:patrick bob Finds items with patrick in the Author property and bob anywhere in the document.
from:name from:patrick Finds items with patrick in either fromName OR fromAddress, since “from” is a property name for both fromName and fromAddress.
before:date before:10/9/2007 Finds items whose PrimaryDate field contains a date before 10/9/2007.
after:date after:10/9/2007 Finds items whose PrimaryDate field contains a date after 10/9/2007.
has:attachment report has:attachment Finds items containing the word report that have attachments. Same as hasattachment:true
is:attachment report is:attachment Finds items that have attachments containing the word report. Same as isattachment:true

this site has a bunch of useful stuff about windows search