1

I have used this line for my post-build to run FxCopCmd.exe:

C:\Program Files (x86)\Microsoft FxCop 10.0\FxCopCmd.exe" /file:"$(TargetPath)" /console

but after I build the project it shows this error:

Error 40 The command "C:\Program Files (x86)\Microsoft FxCop 10.0\FxCopCmd.exe" /file:"C:\csharpForFXCOP\MyTestPrj\bin\MyTestPrj.exe" /console" exited with code 9009.

So what am I doing wrong?

Bohn
  • 26,091
  • 61
  • 167
  • 254

1 Answers1

1

Try running the same command line from a Windows command prompt. If the additional information this provides is not sufficient for you to identify the problem, please add the details to your post.

Nicole Calinoiu
  • 20,843
  • 2
  • 44
  • 49
  • cannot! it is in post build so it knows which assembly I am working on but if I go to command line then after going to fxcop folder the command is like "FxCopCmd.exe" /file:"$(TargetPath)" /console" which does not know which C# project to build – Bohn Nov 23 '11 at 16:17
  • You included the literal command line in your post, so you actually do know what it is. – Nicole Calinoiu Nov 23 '11 at 16:31