I'm working on a project and we have a huge assembly if hundreds of types. I would like to add some kind of code analysis, but only on new types. In FxCop I can chose the types and/or namespaces I want to have analyzed. I can't seem to find a way to do so in VS2010 code analysis. Is it just me or is this not possible?
Yes, it's possible in VS2010, but there's no UI for creating the subset. Instead, you'll either need to either specify the inclusion/exclusion list via the CodeAnalysisAdditionalOptions MSBuild property (using the /types command line parameter that will be used when running FxCopCmd.exe) or via a .fxcop project file specified via the CodeAnalysisProject MSBuild property.
The latter approach caused problems in VS2008 since FxCop would attempt to load the target DLL twice if it was included in the project file. I haven't tried it in VS2010, but it's certainly worth giving it a shot before resorting to the CodeAnalysisAdditionalOptions approach.
N.B.: This is exactly the same answer already provided at http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/fd431e4d-401d-4b5b-b07d-144198e0dc30.