0

I forced Code Analysis execution on VSTS (with Hosted2017 agent) to build a VS2017 solution using .NET framework 4.6.1. But I don't have the same spelling errors (CA1704 rule) on VSTS and on my machine with VS2017 Enterprise. On my machine, I fix all spelling errors. But on VSTS, I have more spelling errors !

MSBUILD : error CA1704: Microsoft.Naming : Correct the spelling of

How can I fix this problem ?

Phil
  • 1,035
  • 2
  • 10
  • 17
  • How do you specify code analysis rule? Project properties or MSBuild argument? Which rule you used? Can you share the detail log on the OneDrive? (Set system.debug variable to true, then queue build and share this log) – starian chen-MSFT Feb 27 '18 at 02:55
  • I created my ruleset file in VS2017 in project properties and on the MSBuild task on VSTS, I added these arguments : /p:RunCodeAnalysis=true;CodeAnalysisRuleSet=../MyProject.ruleset – Phil Feb 27 '18 at 10:16

1 Answers1

0

Ok, I found the problem. FxCop was executed in a different culture on my VS2017 (french) and on VSTS (english). I changed the language of my VS2017 in Options\Environment\InternationalSettings to English and restart VS2017. Now I get the same list of Code Analysis errors on VSTS and on my VS2017 !

Phil
  • 1,035
  • 2
  • 10
  • 17