Problem with FxCop "Cannot find the FxCopCmd executable"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with FxCop "Cannot find the FxCopCmd executable"

fvaughn
Hello,
I've read several threads on this, but I'm still unable to overcome the problem. I'm trying to run C# analysis, but I continue to get errors with the FxCop executable not being found (error below).

I'm running Sonar 4.5 Community edition with the Analysis Bootstrapper for Visual Studio Projects Plugin 1.2.

ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Cannot find the FxCopCmd executable "C:\HelloWorld1\"C:\Progra
m Files (x86)\Microsoft Fxcop 10.0\FxCopCmd.exe"" provided by the property "sona
r.cs.fxcop.fxCopCmdPath".
ERROR:

I've tried running this with both the Sonar runner 2.3 and 2.4, but same error. I can manually run FxCop on the command line and via Graphical interface with no problems. I've also tried running this on another system with the same configuration and I see the same problem. FxCop appears to be installed correctly and runs without errors outside of the Sonar runner.

I have defined the following FxCop properties (and various permutations):

sonar.fxcop.installDirectory="C:/Program Files (x86)/Microsoft Fxcop 10.0"
sonar.cs.fxcop.fxCopCmdPath="C:/Program Files (x86)/Microsoft Fxcop 10.0/FxCopCmd.exe"

The FxCop.exe and FxCopCmd.exe are both located in the directory list above.

Notice the error output above, it indicates the Sonar running is looking for FxCopCmd in "C:\HelloWorld1\"C:\Progra. -- that seems to be the problem, that it's prepending C:\HelloWorld1 to the path. That is my current working directory, but it's not defined in either of the FxCop properties.

I've also tried minimizing my project to NOT include any FxCop rules, and it runs successfully, so everything else seems to be working correctly. The problem is with FxCop. I'm running FxCop 10.0.

How can I fix this? I appreciate any help.

thanks,
Fred
Reply | Threaded
Open this post in threaded view
|

Re: Problem with FxCop "Cannot find the FxCopCmd executable"

Dinesh Bolkensteyn-2
Hi Fred,

Here's what I suggest:

1. Set the property on a single line
2. Do not enclose the value with double quotes (this is probably the source of the issue)
3. Use the forward-slash '/' instead of the backslash '\' to delimit folders (as '\' is the escape character AFAIR)

Hopefully it will then work.

Kind regards,


On Mon, Nov 3, 2014 at 7:24 PM, fvaughn <[hidden email]> wrote:
Hello,
I've read several threads on this, but I'm still unable to overcome the
problem. I'm trying to run C# analysis, but I continue to get errors with
the FxCop executable not being found (error below).

I'm running Sonar 4.5 Community edition with the Analysis Bootstrapper for
Visual Studio Projects Plugin 1.2.

ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Cannot find the FxCopCmd executable
"C:\HelloWorld1\"C:\Progra
m Files (x86)\Microsoft Fxcop 10.0\FxCopCmd.exe"" provided by the property
"sona
r.cs.fxcop.fxCopCmdPath".
ERROR:

I've tried running this with both the Sonar runner 2.3 and 2.4, but same
error. I can manually run FxCop on the command line and via Graphical
interface with no problems. I've also tried running this on another system
with the same configuration and I see the same problem. FxCop appears to be
installed correctly and runs without errors outside of the Sonar runner.

I have defined the following FxCop properties (and various permutations):

sonar.fxcop.installDirectory="C:/Program Files (x86)/Microsoft Fxcop 10.0"
sonar.cs.fxcop.fxCopCmdPath="C:/Program Files (x86)/Microsoft Fxcop
10.0/FxCopCmd.exe"

The FxCop.exe and FxCopCmd.exe are both located in the directory list above.

Notice the error output above, it indicates the Sonar running is looking for
FxCopCmd in "C:\HelloWorld1\"C:\Progra. -- that seems to be the problem,
that it's prepending C:\HelloWorld1 to the path. That is my current working
directory, but it's not defined in either of the FxCop properties.

I've also tried minimizing my project to NOT include any FxCop rules, and it
runs successfully, so everything else seems to be working correctly. The
problem is with FxCop. I'm running FxCop 10.0.

How can I fix this? I appreciate any help.

thanks,
Fred



--
View this message in context: http://sonarqube.15.x6.nabble.com/Problem-with-FxCop-Cannot-find-the-FxCopCmd-executable-tp5029728.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Problem with FxCop "Cannot find the FxCopCmd executable"

fvaughn
Excellent, thanks, that solved my problem, it was the double quotes.

best regards,
Fred