Correct usage of the CompilerGeneratedAttribute and the GeneratedCodeAttribute

Both Code Analysis, FxCop and Code Metrics make extensive use of CompilerGeneratedAttribute and GeneratedCodeAttribute to distinguish between user-written code and tool and compiler generated code. The following describes this behavior: Code Analysis in Visual Studio 2005 and FxCop 1.35 – Compiler Generated. Does not raise warnings against compiler generated code. Uses an algorithm (mainly based on the…

8

After upgrading to Service Pack 1, the error ‘CA0055: Could not load [AssemblyName]’ occurs when running Code Analysis

We’ve been hearing a few reports of the following errors being output to the Error List after upgrading to Visual Studio 2005 Service Pack 1 (SP1): CA0055 : Could not load [AssemblyName].CA0052 : No targets were selected. If you look at the [AssemblyName].CodeAnalysisLog.xml file within your output folder, it may have contents similar to the following:         <?xml…

1

Visual Studio 2005 SP1 Bug Fixes

Following Brian Harry’s lead and transparency, below is list of Managed Code Analysis fixes that made it into Visual Studio 2005 Service Pack 1.  Analysis FxCop reporting CA1811 on private const, while const is being used in code. Microsoft.VisualBasic.ComClassAttribute cause VB.NET compiler to generate code that doesn’t comply with design rules and gets noisy in FxCop…

3