DanielHWe / sonar-fxcop

FxCop plugin for C# or VB.NET projects
14 stars 6 forks source link

No FxCop analysis has been performed on this project #5

Closed LegacyEbenZhang closed 6 years ago

LegacyEbenZhang commented 7 years ago

The error

java.lang.IllegalArgumentException: No FxCop analysis has been performed on this project, 
whereas it contains cs files: Verify that you are using the latest version of the SonarQube Scanner for MSBuild, and if you do, 
please report a bug. In the short term, you can disable all FxCop rules from your quality profile to get rid of this error.
        at org.sonar.plugins.fxcop.FxCopConfiguration.checkMandatoryProperties(FxCopConfiguration.java:104)
        at org.sonar.plugins.fxcop.FxCopConfiguration.checkProperties(FxCopConfiguration.java:95)
        at org.sonar.plugins.fxcop.FxCopSensor.execute(FxCopSensor.java:69)
        at org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57)
        at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)

The versions

The scripts to run the scanner

SonarQube.Scanner.MSBuild.exe begin /key:"TheKey" /name:"TheName" /version:"TheVersionNum" /d:sonar.verbose=true
msbuild /m /p:configuration=Debug /t:Rebuild TheProject.sln -- after this step I can see the CodeAnalysis.xml for each dll.
SonarQube.Scanner.MSBuild.exe end
LegacyEbenZhang commented 7 years ago

Well, figured out. One of the csproj has a post-build task to delete its *.xml. Maybe need to add more information to help investigation.

ghost commented 6 years ago

I'm also getting the same error. Can you tell me the fix if your fixed it?

LegacyEbenZhang commented 6 years ago

Mine was due to a silly post build script that deletes the CodeAnalysis.xml. @ab50281 yours probably a different issue.

DanielHWe commented 6 years ago

Version 1.3 gives better output what was wrong with the parameters