sla*_*ets 1 .net c# db2 unity-container
我有一个ASP.Net应用程序,它引用一个带有一些可重用代码的程序集(常用工具,数据访问等).装配参考IBM.Data.DB2.dll.但是,我没有在我的应用程序中使用DB2,IBM.Data.DB2.dll它只是一个依赖项(如果应用程序需要连接到DB2).最近,我遇到了以下错误:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ReportingServices.Interfaces, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.ReportingServices.Interfaces, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Unity.AutoRegistration.AutoRegistration.<ApplyAutoRegistration>b__5(Assembly a)
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at Unity.AutoRegistration.AutoRegistration.ApplyAutoRegistration()
Run Code Online (Sandbox Code Playgroud)
整个应用程序中包含Microsoft.ReportingServices.Interfaces的唯一文件是该IBM.Data.DB2.dll文件.在部署应用程序时,我不需要SQL Server或本地安装SQL Server的开销少得多.请记住,我需要使用具有依赖性的程序集,IBM.Data.DB2.dll并且此错误在过去没有发生过,它似乎是最近的.
我尝试过绑定重定向,通过Nuget安装Microsoft.ReportingServices.Interfaces都无济于事.
有谁知道为什么会出现这个错误,更重要的是......如何解决它?
如果IBM.Data.DB2.dll引用Microsoft.ReportingServices.Interfaces,您可能需要手动复制Microsoft.ReportingServices.Interfaces.dll到您的bin文件夹中.这是一篇可以帮助你的帖子:
SSRS 2005缺少Microsoft.ReportingServices.Interfaces.dll