Q&A: Multi targeting and Visual Studio 2008, how do I ensure I only use the available APIs?

This question has come up a couple of times in the last few weeks as developers move to Visual Studio 2008 but need to continue to work on Visual Studio 2005 projects. The good news is we have a comprehensive solution for this thanks to the Code Analysis/FxCop team. However to use this you either need to:

David Kean in the Code Analysis team has a detailed post on both approaches.