Monday, September 3, 2012

TFS 2010 + VS 2012 : CodeAnalysis problem

Recently we run into an interesting issue - suddenly our quality build stopped to perform code analysis, although build definition and build template were not changed.
After some investigation problem appeared to be in the solution file. Developers have started using VS 2012 (and customers build environment is TFS 2010), and as soon as they have done any change to the solution file and checked it in - the problem came.

Symptom: no code analysis files produced.
Reason: solution file information changes to VS 2012.

Here is the problem (from Detailed build log).
Before (code analysis runs OK):
After (code analysis doesn't run):

We found a temporary work around - to set up solution information back to VS 2010 - in the solution file replace 2 first lines with :

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
That will give you your code analysis reports back.

Waiting for what MS will say. Will keep you posted.

1 comment: