In one of our solutions, when Code Code (CA) is turned on, we get an error:
CA0001 : Member 'FirstOrDefault' could not be found in type 'System.Linq.Enumerable' in assembly '[our project]'.
On the Internet ( http://msdn.microsoft.com/en-us/library/ms245246.aspx ) Microsoft advises us to look in the CodeAnalysisReport.xml file. But nowhere on my machine does such a file exist.
Also on the msdn page we look at user rules, but we do not have any user rules.
Can someone please lead us in the right direction, how to fix this? Or how do I get more information about this strange CA behavior?
Edit: @ April 25, 2012 - 10:38
After doing some research on VS2010 output, I found the [mydll] .CodeAnalysisLog.xml file in the bin / debug directory. There the error is more indicated:
<Exception Keyword="CA0001" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Member 'FirstOrDefault' could not be found in type 'System.Linq.Enumerable' in assembly 'Prodigy.UI.Modules.SecurityDesigner.Silverlight, Version=0.0.0.1, Culture=neutral, PublicKeyToken=fdb1b3fc35f0c32e'.</ExceptionMessage>
<StackTrace> at Microsoft.FxCop.Engines.Phoenix.LoadAndResolutionHandler.HandleFailureToFindMatch(ModuleUnit unit, String memberName, Type memberType, String className, UInt32 memberRefToken, UInt32 classToken)
at Phx.Metadata.ReaderImplementation.GetExternalDefinitionMemberSymbolHelper(UInt32 memberToken, String name, Byte* signature, Symbol parentSymbol, Symbol originalParentSymbol)
at Phx.Metadata.ReaderImplementation.GetExternalDefinitionMemberSymbolHelper(UInt32 memberToken, String name, Byte* signature, Symbol parentSymbol, Symbol originalParentSymbol)
at Phx.Metadata.LoaderImplementation.GetExternalDefinitionMemberSymbol(UInt32 memberToken)
at Phx.Metadata.LoaderImplementation.GetMemberReferenceSymbol(UInt32 memberReferenceToken)
at Phx.Metadata.MetadataLoader.LoadMemberReferences(AssemblyUnit unit)
at Microsoft.FxCop.Engines.Phoenix.AssemblyLoader.LoadAssembly(String filePath)
at Microsoft.FxCop.Engines.Phoenix.PhoenixAnalysisEngine.AnalyzeInternal()
at Microsoft.FxCop.Engines.Phoenix.PhoenixAnalysisEngine.Analyze()
at Microsoft.FxCop.Common.EngineManager.Analyze(Project project, Boolean verboseOutput)</StackTrace>
</Exception>
, ?