На Windows Server 2003 R2 с .NET 4 SDK, но без Visual Studio 2010, я попытался создать решение Visual Studio 2010 с
msbuild MySolution.sln /p:RunCodeAnalysis=true
но это не удается.
Что требуется для запуска анализа кода в такой среде?
I get this error message:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(129,9): error MSB6003: The specified task executable "FxCopCmd.exe" could not be run. Could not load file or assembly 'Microsoft.VisualStudio.CodeAnalysis.Sdk, Version=10.0.0.0, Culture=neutral, PublicKeyToken= b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Я установил FxCop из SDK и безуспешно указал переменную FxCopDir на место установки FxCopCmd.exe, а также установил эту запись реестра в это место:
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\Setup\EDev@FxCopDir