I have VS 2005 and .NET 2 on my computer.
I downloaded .NET 4 from the MS website.

In C:\Windows\Microsoft.NET\Framework, I now have folders for several versions of .NET, including v2.0.50727 and v4.0.30319.

In C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat, I updated the FrameworkVersion and paths from v2.0.50727 to v4.0.30319.

Now when I open VS and look in the object browser, all the paths still point to C:\Windows\Microsoft.NET\Framework\v2.0.50727.

I opened the Project\Add Reference... menu. All the components have a runtime of v2.0.50727 or lower.

I built a new test app, and looked at the manifest with ildasm. It shows
Code:
// Metadata version: v2.0.50727
What do I need to do to use .NET 4?