tagged [fxcop]

Was FxCop wrong to tell me to use the .Net Uri class?

Was FxCop wrong to tell me to use the .Net Uri class? When getting a URL for something in an Amazon S3 bucket it can append a signature to the end to confirm that the user has permission to view the o...

21 Feb at 18:41

CA1500 vs. SA1309 - Which one wins?

CA1500 vs. SA1309 - Which one wins? I'll prefix by saying that I understand that both Code Analysis and StyleCop are meant as guidelines, and many people chose to ignore these anyway. But having said ...

CA1819: Properties shouldn't return arrays - What is the right alternative?

CA1819: Properties shouldn't return arrays - What is the right alternative? I encountered this FxCop rule before and wasn't really content with how to solve violations ([thread1](https://stackoverflow...

23 May at 11:52

Using Microsoft.Bcl.Async with Code Analysis causes errors

Using Microsoft.Bcl.Async with Code Analysis causes errors I'm trying to use [Microsoft.Bcl.Async](https://nuget.org/packages/Microsoft.Bcl.Async) and Code Analysis, but when I run Code Analysis I get...

How to implement dispose pattern with close method correctly (CA1063)

How to implement dispose pattern with close method correctly (CA1063) The Framework Design Guidelines (2nd Ed., page 327) say: > CONSIDER providing method `Close()`, in addition to the `Dispose()`, if...

20 Jun at 09:12

How do you "properly" implement Dispose() (according to FxCop) when your implementation is an empty method? (CA1063)

How do you "properly" implement Dispose() (according to FxCop) when your implementation is an empty method? (CA1063) I have an implementation of an interface, and that interface extends `IDisposable`....

20 Jan at 21:22

Nested using statements and Microsoft code Analyses

Nested using statements and Microsoft code Analyses Recently I switched on additional code analyses rules. To my surprise I saw a violation in a place I was always considering as the best practice. If...

23 May at 10:29

Why can't Microsoft analyzers find Microsoft.CodeAnalysis?

Why can't Microsoft analyzers find Microsoft.CodeAnalysis? I'm trying to add [Microsoft.CodeAnalysis.FXCopAnalyzers](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/) (latest stab...