Larry Steinle

January 25, 2011

Can’t Find System.Runtime.CompilerServices.Extensions in VS.Net 2010

Filed under: VS.Net — Larry Steinle @ 10:49 pm
Tags:

We’ve all been there. It’s that silly, nagging thing that slows you down. You know the answer is obvious but you just can’t figure it out in a second. You know the developer beside you will point it out in an instant if you show them but your too proud to say anything.

It happens to all of us at one time or another…And another…And another. I digress…

This evening I was working on a new post for my blog about extensions. So I began by creating a new project in VS.Net 2010 and added the module and routine. I then went to apply the Extensions attribute and you know what? I couldn’t find it. Of course! In .Net 2010 they stopped supporting Extensions in CLR 4.0!

Well, now that just sounds silly! That can’t be right. Surely someone else has had this happen. So after a fifteen minute search on Google turns up nothing I return to VS.Net. Maybe they stopped supporting it? But that doesn’t make sense because there was never an obsolete message stating that in the next version of .Net it won’t be supported.

Finally after a wasted thirty minutes of research I realize the silly mistake I’d made. When creating the project I used the default configuration left from a previous create project action…I created the project using CLR 2.0 which does not support Extensions. Extensions weren’t created until CLR 3.5 with VS.Net 2008!

Once the Project was updated to compile with CLR 4.0 as intended the namespace showed up.

Don’t laugh! You’ve had your moment too or you wouldn’t be wasting your time reading this post!

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: