While trying to install Visual Studio 2008 on a Windows 2008 R2 machine you may get the following error.
This is because Windows 2008 R2 ships with the .NET 3.5.1 framework. You just need to enable the feature from Server Manager.
So before starting the Visual Studio 2008 Setup install the .NET Framework 3.5.1 Features from the Add Features Wizard in Server Manager.
After that when you run the Visual Studio 2008 Setup, the installer will detect that the 3.5 framework is already installed and skip to the next step.
http://blogs.msdn.com/b/vijaysk/archive/2009/08/16/you-must-use-the-role-management-tool-to-install-or-configure-microsoft-net-framework-3-5.aspx