Q:

Why is the Target Framework dropdown empty and greyed out in my C# class library, VS2008

Fairly self-explanatory. I have recently installed .NET framework 4 and VS2010 but I want to compile my 3.5 projects using 3.5 as 4 has not yet been installed on our production servers and I get "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." if I try
All project types have the target framework dropdown greyed out

A:

Make sure that your registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\OnlyUseLatestCLR

and
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\OnlyUseLatestCLR

are set to 0 (not 1).
This fixed it for me since applications like VS2008 are no longer forced to use .NET 4.0 runtime. I had previously set these registry keys to allow Powershell run inder .NET 4.0, however, a config file should be used for that instead.

