I found the solution from another post in this forum. I am sharing the answer for the others that may come across the same issue.
check this post
http://forums.autodesk.com/t5/revit-api/advice-on-debugging-c-in-visual-studio/td-p/6496811
someone suggested to set the "Used Managed Compatibility Mode". Check the comments and give him thumbs up!