Domanda

I have a project that targets .NET 4.5. In Visual Studio 2012, I can run code analysis (FxCop) just as in older version of Visual Studio.

Our build machine used the build agent from our Team Foundation Server Server which is Team Foundation Server 2010. We have installed the .NET 4.5 SDK out of the Windows 8 SDK which has enabled the build agents to compile the .NET 4.5 projects. We have FxCop installed and static code analysis "just works" for project targeting .NET 4.0, but it cannot be found in the logs when targeting .NET 4.5.

Is this even possible? Will it work if we upgrade to Team Foundation Server 2012?

What we have tried:

Updating FxCop to 10.0 (from 1.36), because I suspected we need an updated version of FxCop to get the analysis just as we needed to install tools enable compilation. However 10.0 predates .NET 4.5. We tried looking for a new version in the SDK, but according to the MS Webpage for the Windows 8 SDK:

FXCopSetup.exe has been removed from the SDK as a tool that is "obsolete or deprecated"

Running FxCop 10.0 against the assemblies using the FxCop GUI seems to work fine.

È stato utile?

Soluzione

Installing Visual Studio 2012 on your build machine would be one solution. We have a build machine using Team Foundation Server 2010 that does code analysis against .NET 4.5. The difference from what you stated is that Visual Studio 2012 is installed on the machine.

Are you looking to upgrade just your build machine to Team Foundation Server 2012 or your Team Foundation Server server? The Stack Overflow question Is Team Build 2012 compatible with Team Foundation Server 2010? addresses using Team Build 2012 with Team Foundation Server 2010 (short answer, no).

Altri suggerimenti

We had the same problem.

In order to run code coverage on a build machine, you are required to install Visual Studio. There is no additional component or download other than the full Visual Studio install that will make this work.

We confirmed this with the Microsoft Visual Studio Product Team.

Unfortunately, it is what it is....sigh.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top