Error: Additional code analysis warnings or errors cannot be displayed
I'm getting a couple of errors consistently when I enable Code Analysis on my ASP.NET Web Project in VS 2005 RC1. The build fails, and around 200 warnings from FxCop are displayed. Here are the errors:
Error 204 CA0503 : Additional code analysis warnings or errors cannot be displayed
Error 205FxCopCmd.exe returned error code 8.
I looked up error code 8 for FxCop, and found it to be an "Assembly load error". It did give me a couple of other errors related to the loading of external referenced assemblies (which do exist locally):
Error 1 CA0055 : Could not load XXXXXXX.dll.
I can't understand what the problem is. Those DLLs are in my project's Bin, and when I uncheck the Enable Code Analysis checkbox for the project, it builds fine.
Are there any other preconditions that have to be set properly to get FxCop working for my project? It's obviously performing at least some of the analysis, because I always get around 200 warnings related to various portions of the project. Any suggestions?
I am also getting "
FxCopCmd.exe returned error code 8." Here is my Exceptions node...
<Exceptions>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load App_Licenses.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'App_Licenses' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load App_WebReferences.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'App_WebReferences' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load App_Web_co9tdufd.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'App_Web_co9tdufd' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load App_Web_lp3yo43d.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'App_Web_lp3yo43d' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load App_Web_xzhjeyia.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'App_Web_xzhjeyia' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load HGVC.Framework.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'HGVC.Framework' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load HGVC.HGVCentral.Business.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'HGVC.HGVCentral.Business' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
<Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load HGVC.HGVCentral.Common.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50215. 'HGVC.HGVCentral.Common' was linked against v2.0.50727 and so cannot be analyzed from within the same project.</InnerExceptionMessage>
<InnerStackTrace> at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.CanLoadTargetFile(TargetFile target)
at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine)</InnerStackTrace>
</Exception>
</Exceptions>