Missing .NET framework installing a VSTO application

I have been getting the error "The required version of the .NET Framework is not installed on this computer." (event id 4096 in Event log) when trying to install a VSTO application from both a ClickOnce deployment and a local copy. This is interesting as the .NET framework is installed (on my 64bit Windows 7 PC) and the VSTO application was developed on the self same machine (and works in Visual Studio 2008).

The fix, it turned out, was to uninstall Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime) (x86) and then reinstall it, once this was done the install worked fine.

Update 17th  Feb 09 A good list of what should be installed can be found at http://blogs.msdn.com/vsto/archive/2008/02/19/deploying-prerequisites-for-your-visual-studio-tools-for-office-solution.aspx. However here does seem to be an install issue over order and leaving incorrect development resource so a look at the diagnostic tools in http://www.microsoft.com/downloads/details.aspx?familyid=46b6bf86-e35d-4870-b214-4d7b72b02bf9&displaylang=en would not go amis. This should be an easy process when using VS2008SP1, but it does seem problematic.