The type or namespace name Tuple could not be found

Posted: January 20, 2011 in .Net4.0
Tags: , , , , ,

I decided to write a method utilizing Tuple which is newly introduced in VS 2010.I did not bother to open a new solution,just tried to add a new method of return type Tuple in an existing project’s class.

It took half an hour to figure out why it was giving a compilation error saying “The type or namespace name “Tuple” could not be found”.I rushed to msdn to figure out which namespace it referes to or any dll I need to refer.I found,it is added in System namespace which is already added to my cs file.I kept on googling for sometime & nothing helped.Finally figured out that though my solution is VS2010,Target Framework is not set to 4.0 & it’s still 3.5 😦 so simple it is,still took long time to track the exact issue.

Moral is,whenever you are implementing something newly introduced to framework,make sure that you check the target framework version & not the visual studio version :).

Advertisements
Comments
  1. Fabian says:

    Thanks!

  2. Pawan Chand says:

    I was doing the same mistake.

    Thanks, very helpful to me.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s