The error you get reads like this: "The source code cannot be sufficiently parsed for Code Generation. Please try to compile your project and fix any issues."
If you are having issues with creating unit tests from the context menu item that says “Create Unit Tests...”, then you might want to read this post to fix the issue.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=170974&SiteID=1