Code analysis fails when you analyze an ASP.NET project that contains binary dependencies from an earlier version of the .NET Framework in Visual Studio 2005 Team System Developer Edition (913447)
The information in this article applies to:
- Microsoft Visual Studio 2005 Team System Developer Edition
SYMPTOMSConsider the following scenario. You use the code analysis tool in Microsoft Visual Studio 2005 Team System Developer Edition. You analyze a Microsoft ASP.NET project that contains binary dependencies from an earlier version of the Microsoft .NET Framework. In this scenario, the code analysis fails with exit code 8. Error CA0055 is in the error list and mentions the name of the binary dependency that causes the failure. An XML file contains the code analysis output. This file is located in the Project subfolder of the Solutions folder. This file contains more detailed descriptions of the error. The file may appear similar to the following: <Exception Keyword="CA0055" Kind="AssemblyLoad">
<Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
<ExceptionMessage>Could not load ASPNETCommerce.dll.</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.FxCopException</InnerType>
<InnerExceptionMessage>The first successfully loaded assembly for this project was linked against v2.0.50727. 'ASPNETCommerce' was linked against v1.0.3705 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> CAUSEThis problem occurs because the Web site contains binary dependencies that are compiled by using an earlier version of the .NET Framework. The code analysis tool cannot analyze binaries that reference an earlier version of the .NET Framework runtime at the same time that the Web site uses the current version of the .NET Framework.RESOLUTIONTo resolve this problem, rebuild the binary dependencies with the .NET Framework 2.0. Then, import the binary dependencies into the Web site project.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 3/6/2006 |
---|
Keywords: | kbProgramming kberrmsg kbtshoot kbprb KB913447 kbAudDeveloper |
---|
|