I am not aware of any static analysis tool, but here's what I've found, based on MSDN docs and a few blog posts:
- VS 2008 / VS 2008 SP1+ / VS 2010 ".NET Framework 2.0" - .NET 2.0 RTM
- VS 2008 / VS 2008 SP1+ / VS 2010 ".NET Framework 3.0" - .NET 3.0 RTM
- VS 2008 ".NET Framework 3.5" - .NET 3.5 RTM
- VS 2008 SP1+ ".NET Framework 3.5" with a reference to
System.Data.Entity.dll
or using ClickOnce - .NET 3.5 SP1
- VS 2008 SP1+ ".NET Framework 3.5" without a reference to
System.Data.Entity.dll
and not using ClickOnce - .NET 3.5 RTM
- VS 2010 ".NET Framework 3.5" - .NET 3.5 SP1
- VS 2008 SP1+ ".NET Framework Client Profile" - .NET 3.5 SP1 (client)
- VS 2010 ".NET Framework 3.5 Client Profile" - .NET 3.5 SP1 (client)
- VS 2010 ".NET Framework 4.0" - .NET 4.0 RTM
- VS 2010 ".NET Framework 4.0 Client Profile" - .NET 4.0 RTM (client)
Notes:
- VS 2008 shipped with .NET 3.5 RTM; VS 2008 SP1 shipped with .NET 3.5 SP1; VS 2010 shipped with .NET 4.0 RTM.
- VS 2010 is unable to target earlier versions unless they are installed seperately.
- The client profile was introduced in .NET 3.5 SP1
- VS 2010 is the first version with extensible multitargeting (so - in theory - it will be able to target future .NET versions without a VS update).
I believe .NET 3.5 SP1 is the only service pack that added significant functionality, so it's the only one that will cause MissingMethodException
problems. For example, this would mean that 3.0 RTM, 3.0 SP1, and 3.0 SP2 have the same public API. I haven't found explicit confirmation of this, but the "what's new in .NET" documentation only covers 2.0/3.5/3.5SP1/4.0, so this is a logical conclusion.
VS 2008 SP1 has some weird rules regarding ".NET Framework 3.5" (trying to target SP1 only if it's actually used), but VS2010 just supports targeting .NET 3.5 SP1.
Sources: