Love & Hate with Microsoft Development Tools (VS 2010 & .Net 4.0)

For about an hour, all I wanted to do was use a WebGet attribute by adding this line of code to a test WCF application I was creating:

using System.ServiceModel.Web;

I went to the Add Reference dialog and looked for the assembly…  But as you can see below, for this project, it wasn’t available.image_2

 

The eventual solution amazed me.  My Target framework was set to .Net Framework 4 Client Profile (as the Add Reference dialog above showed with Filtered to: .Net Framework 4 Client Profile).  For some reason this is the default for newly created console applications.

image_4

Changing the Target framework to .Net Framework 4 solved my mystery.

image_6

These kinds of awkward behaviors are huge time killers.  While I believe Microsoft is trying to hide complexity for developers—to make it “easy”—I would rather see everything happening under the covers rather than try to figure it out after the fact.  Developing software is hard enough with out the tools making assumptions.

And a special thanks Patrick Cauldwell for saving me even more time searching for a solution.

Leave a Reply

Your email address will not be published. Required fields are marked *