我已经升级了刺激软件报告版本,从2014.3.0.0到2021.1.1 (安装了Nuget软件包管理器的Stimulsoft.Reports.Web 2021.1.1 ),并添加了生成pdf报告的代码。它在本地实例上运行得很好,但在部署到活动时却抛出了程序集错误。
错误如下:
System.IO.FileNotFoundException: Could not load file or assembly 'Stimulsoft.Data, Version=2021.1.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a' or one of its dependencies. The system cannot find the file specified.
File name: 'Stimulsoft.Data, Version=2021.1.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a'
at Stimulsoft.Report.StiNameValidator.CorrectName(String str, Boolean checkKeywords, StiReport report, Boolean isDataExpression)
at Stimulsoft.Report.StiReport.GetReportName()
at Stimulsoft.Report.StiReport.ScriptNew()
at Stimulsoft.Report.StiReport.Clear(Boolean generateNewScript)
at Stimulsoft.Report.StiReport.LoadPackedReport(Stream stream)
at Stimulsoft.Report.StiReport.LoadPackedReport(Byte[] bytes)有谁能建议一下吗?
发布于 2021-02-16 09:14:36
这是部署问题。MsBuild在构建应用程序时不包括间接引用。所以,我刚刚更新了Manifest文件,它解决了问题。
发布于 2021-02-09 22:44:26
我相信你错过了更新的程序集重定向。请参阅:https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions
这就是我在web.config中要做的:
<configuration>
<runtime>
<assemblyBinding ...>
<dependentAssembly>
<assemblyIdentity name="Stimulsoft.Data"
publicKeyToken="ebe6666cba19647a" />
<bindingRedirect oldVersion="2014.3.0.0" newVersion="2021.1.1.0" />
</dependentAssembly>
</assemblyBinding >
</runtime>
</configuration>发布于 2021-02-10 01:14:07
这可能是一个构建和部署问题,解决方案取决于构建和部署应用程序的方式。这就是我要做的:
注意:我使用ILSpy进行反编译。
https://stackoverflow.com/questions/65955233
复制相似问题