Posts Tagged ‘The type or namespace name Tuple could not be found’

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