我的网络应用程序有一份内部报告,当我在本地浏览该报告时,该报告会按预期显示。我正在使用一个rdlc
and xsd
有标准的apsx
用于呈现报告的网页。
我现在已部署到我的临时服务器,当我尝试浏览显示我收到的报告的页面时:
An unexpected error occurred in Report Processing.
Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
在本地,我添加了对Microsoft.SqlServer.Types
通过浏览:
C:\ Windows \程序集\ GAC_MSIL \ Microsoft.SqlServer.Types \ 11.0.0.0__89845dcd8080cc91
我已将其设置为Copy Local
并可以看到.dll
在临时服务器上的 bin 文件夹中,但是我仍然收到错误消息。
出于兴趣我复制了.dll
从我的本地计算机,并将其 ftp 到临时服务器并进入 bin 文件夹。然后它暂时起作用,直到我进行另一次提交,该提交擦除了 bin 文件夹并返回了错误。
它的版本就像Microsoft.SqlServer.Types
也许在登台服务器的操作系统上已经过时了?
这里发生了什么?
对我来说同样的问题,但问题是 app.config 中的绑定重定向尚未更新到新版本。通常更新 nuget 包会自动完成,但此 nuget 包位于引用的项目中。简单修复:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings />
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
<!-- <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" /> -->
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)