I have seen in this TechNet article where SharePoint supports .NET 3.5. I’ve looked to see if SharePoint requires .NET 3.5 and it appears that it only requires .NET 3.0, even with SP1 or SP2.
Can anyone confirm that SharePoint only requires .NET 3.0 regardless of what service pack you have?
Also, is there a recommended approach for detecting the presence of .NET 3.5? My typical approach is to have a method that accesses a .NET 3.5 assembly and the JIT of that method will fail when I call the method if the assembly cannot be loaded.
Only .NET 3.0 is required (obviously the service packs are recommended). This version had only just been released when SharePoint 2007 came out:
I think your detection method will work although if an exception is raised you could get some performance problems. You could use this approach asked in another SO question or just check
System.Environment.Version.ToString().