Command-line version of Microsoft's FxCop, a free static analysis tool for analyzing .NET managed code assemblies.
Questions tagged [fxcopcmd]
42 questions
7
votes
1 answer
FxCop: Suppression message for async method
I am using FxCopCmd tool for static code analysis. Since we already had a huge codebase, we baselined existing issues using baseline.exe tool that comes with FxCop.
I am observing that if I add a new method to my C# class, then some of the…

Gaurav Deshmukh
- 381
- 3
- 15
5
votes
4 answers
FxCop can't resolve references
I'm working on project in C#. Now I've set up a Hudson server
an I've installed the .Net 4 Framework and the Windows SDK 7.1 on the server.
The project builds successfully but when I start FxCop with:
"C:\Program Files (x86)\Microsoft FxCop…

CoolKiffings
- 567
- 1
- 8
- 16
4
votes
1 answer
TeamCity FxCop Selecting MinimumRecommendedRules.ruleset has no effect
I have added a Build Step in TeamCity 8.0.6 (build 27767) to execute FxCop against a specific c# project assembly.
When running FxCop from within VS 2013 with the MinimumRecommendedRules set I get no errors or warnings (I fixed them all).
Now I…

Redeemed1
- 3,953
- 8
- 38
- 63
4
votes
1 answer
FxCop behavior in VS2010, Code Analysis, and SuppressMessage
I have a class like this one:
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Io")]
public void ParaQueFalleCalidadCodigoUnoIo_ReglaCA1709()
{
}
…

Kiquenet
- 14,494
- 35
- 148
- 243
3
votes
0 answers
FxCop doesn't understand null conditional operator
Consider this code:
protected override void Dispose(bool disposing)
{
if (disposed)
return;
if (disposing)
{
activeFile?.Dispose();
...
FxCop is identifying this as…

Brad
- 3,190
- 1
- 22
- 36
3
votes
0 answers
show fxcop result using jenkins pipeline as code
I have pipeline job in jenkins which build the .net solution project. Run the MS Test and also does the static code analysis using FxCopCmd using command line (batch). I would like to show the fxcop result in jenkins itself. I know there is a…

Vimal Patel
- 119
- 1
- 1
- 4
3
votes
1 answer
FxCop Initialization Erroro CA0001
I am attempting to run FxCopCmd 10.0 through Sonar-runner. However, FxCop is returning an error even though it generates an analysis report. Since it returns an error, sonar-runner does not slurp the report.
To isolate the issue I have run…

Kevin C.
- 31
- 2
2
votes
1 answer
FxCop 10.0 in post-build, [Location not stored in Pdb] in VS2010
I'm trying to get a post-build event up and running which will get the contents of FxCop warnings/errors into the Error List
This is my post-build event commandline:
"$(ProgramFiles)\Microsoft FxCop 10.0\FxCopCmd.exe" /file:"$(TargetPath)"…

enashnash
- 1,578
- 1
- 15
- 36
2
votes
1 answer
Globally disabling FxCop errors in TeamCity
Ok, another FxCop question for today.
I've read the arguments regarding the IdentifiersShouldBeCasedCorrectly rule, and whether or not it should be "XML" or "Xml". Well, I'm an "XML" guy and I want to stay that way. Therefore, I do not want FxCop…

Dave
- 14,618
- 13
- 91
- 145
2
votes
0 answers
Trying to debug custom FxCop rule fails because FxCopCmd can't load the assembly (CA0055)
I'm trying to debug a custom FxCop rule I wrote by following this FAQ: http://blogs.msdn.com/b/codeanalysis/archive/2007/05/16/faq-how-do-i-debug-a-custom-rule.aspx ("Debugging within Visual Studio or via command-line" section)
Initially I got some…

user1039580
- 359
- 5
- 15
2
votes
1 answer
Exclude rules from FXCop via command line
Was using the MSBuild task a while back, and found some documentation about being able to exclude specific rules, e.g. -Microsoft.Design#CA2210. The MSBuild task translates that into /rule:-Microsoft.Design#CA2210.
We are now using the FXCop build…

mickyjtwin
- 4,960
- 13
- 58
- 77
1
vote
1 answer
FxCop: get custom dictionary work from command line
I can't find the answer here or in google. I'm trying to do the simplest - having CustomDictionary.xml in a solution subfolder (this is a requirement) and FxCop installed via copying it to build server (requirement too) i need to run FxCopCmd…

Ivan G.
- 5,027
- 2
- 37
- 65
1
vote
1 answer
Getting post-build event errors on running FxCopCmd.exe
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…

Bohn
- 26,091
- 61
- 167
- 254
1
vote
2 answers
FxCop throws an exception on the command line, but not in the GUI?
I've an FxCop 10.0 project that runs fine through the FxCop GUI but when I run it throught the FxCopCmd command line app (which I want to use as part of our automated build process) it generates the following exception - apparently while trying to…

Jackson Pope
- 14,520
- 6
- 56
- 80
1
vote
1 answer
FxCopCmd argument encoding problem
Problem:
I need to use FxCopCmd.exe (FxCop 10.0) from my code, and my problem is, that FxCopCmd gets my arguments (see below p.StartInfo.Arguments) with some encoding problem, I believe. (I have no experience in encoding, or…

ike
- 95
- 1
- 1
- 8