声纳错误 CA0053

Error CA0053 with Sonar

在 运行 VSSonarExtension:

时出现此错误
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\dataflowrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\designrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\globalizationrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\interoperabilityrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\maintainabilityrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\mobilityrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\namingrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\performancerules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\portabilityrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\reliabilityrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\securityrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\securitytransparencyrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 10.0\team tools\static analysis tools\
  fxcop\rules\usagerules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : CA0053 : Unable to load rule assembly
  'c:\program files (x86)\microsoft visual studio 12.0\team tools\static analysis tools\
  fxcop\rules\securitytransparencyrules.dll': Unable to load one or more of the requested types.
  Retrieve the LoaderExceptions property for more information.
MSBUILD : error : Code Analysis detected errors.
  See Code Analysis results window or log file for details.
  1081 Warning(s) 15 Error(s)
  Time Elapsed 00:00:41.66 
  [CxxSonarQubeMsbuidRunner] Failed to build project, check log in .cxxresults\BuildLog.txt

People are saying因为该项目是在以前的VS版本上创建的(我使用的是VS2013)。该错误与 FxCop 有关。有谁知道如何修复它并从 VSSonarExtension 获取报告?感谢任何输入!

看来我明白了 - 错误确实是由于项目是在早期版本的 VisualStudio 上创建的。来自包含解决方案的文件夹中 this website helps significantly - I have checked out my solution, placed the CA0053 Fix 文件的修复,确保文件(特别是所有 .csproj 文件)不是 read-only 和 运行 工具。这似乎解决了问题。