Hi Wei Li,
That is a strange error, I've never encountered it myself. When I google this error I find only 2 things.
the second link seems to be about VS 2008 but a very similar error.
Possibly there is something about a resource file in your project that it doesn't like.
Things I would try:
reboot if you have not already
if there are any other projects in your solution that depend on the project you changed to 4.0 make sure you also change the dependent project to 4.0
review the naming of your resource files
review all references under the references node in your project
try removing and re-adding each reference
Hope it helps,