9
The Target Framework Migrator extension works great.
After you install it simply go to Tools -> Target Framework Migrator
I'm not sure about moving from 3.5 to 4.0, but in case you're upgrading from 2.0 to 4.0, you'll see that VS2010 actually added a default app.config file (in case you didn't have your own), which means that you'll also have to copy this file to each of the projects. Also, in case you have some *.designer files, those may change as well, so you'll have to update accordingly...
To summarize, here's the procedure: