The best way is to VS 2010 do automatically for you but looks in your case it is not happening sometimes.
Check this article:
http://www.asp.net/(S(ywiyuluxr3qb2dfva1z5lgeg))/learn/whitepapers/aspnet4/breaking-changesSee if you get any errors while migrating and if there is any fix for that in the above article.