Could not load file or assembly 'Stimulsoft.Report
Posted: Wed Dec 09, 2020 2:59 pm
Hi,
I'm trying to render my report by getting the report from its assembly using the code below.
p.s: the code is invoked within the MvcApplication class
But I got this error!
Error Message=>
--------
Could not load file or assembly 'Stimulsoft.Report, Version=2020.5.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
--------
Stack Trace=>
-------
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Stimulsoft.Report.StiReport.GetReportsFromAssembly(Assembly assembly) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 648
at Stimulsoft.Report.StiReport.GetReportFromAssembly(Stream assemblyStream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 754
at Stimulsoft.Report.StiReport.GetReportFromAssembly(String assemblyFile, Boolean lockFile) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 723
at Stimulsoft.Report.StiReport.GetReportFromAssembly(String assemblyFile) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 683
at Logistics.MvcApplication.<printCertificate>d__10.MoveNext() in D:\Projects\WebinarProject\Webinars\Logistics\Global.asax.cs:line 234
-------
FusionLog=>
=== Pre-bind state information ===
LOG: DisplayName = Stimulsoft.Report, Version=2020.5.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a
(Fully-specified)
LOG: Appbase = file:///D:/Projects/WebinarProject/Webinars/Logistics/
LOG: Initial PrivatePath = D:\Projects\WebinarProject\Webinars\Logistics\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Projects\WebinarProject\Webinars\Logistics\web.config
LOG: Using host configuration file: C:\Users\USER\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Stimulsoft.Report, Version=2020.5.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a
LOG: Attempting download of new URL file:///C:/Users/USER/AppData/Local/Temp/Temporary ASP.NET Files/vs/322b9840/5d276d11/Stimulsoft.Report.DLL.
LOG: Attempting download of new URL file:///C:/Users/USER/AppData/Local/Temp/Temporary ASP.NET Files/vs/322b9840/5d276d11/Stimulsoft.Report/Stimulsoft.Report.DLL.
LOG: Attempting download of new URL file:///D:/Projects/WebinarProject/Webinars/Logistics/bin/Stimulsoft.Report.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Build Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Can you help, please?
I'm trying to render my report by getting the report from its assembly using the code below.
p.s: the code is invoked within the MvcApplication class
Code: Select all
public class MvcApplication : System.Web.HttpApplication
{
...
private async Task printCertificate(string data, long chatid, string caption)
{
...
StiReport report = null;
try
{
if(System.IO.File.Exists(sFullFileName))
{
report = StiReport.GetReportFromAssembly(sFullFileName);
report.Render(false);
}
}
catch (Exception e)
{
string s = e.Message;
}
...
}
...
}
But I got this error!
Error Message=>
--------
Could not load file or assembly 'Stimulsoft.Report, Version=2020.5.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
--------
Stack Trace=>
-------
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Stimulsoft.Report.StiReport.GetReportsFromAssembly(Assembly assembly) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 648
at Stimulsoft.Report.StiReport.GetReportFromAssembly(Stream assemblyStream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 754
at Stimulsoft.Report.StiReport.GetReportFromAssembly(String assemblyFile, Boolean lockFile) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 723
at Stimulsoft.Report.StiReport.GetReportFromAssembly(String assemblyFile) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 683
at Logistics.MvcApplication.<printCertificate>d__10.MoveNext() in D:\Projects\WebinarProject\Webinars\Logistics\Global.asax.cs:line 234
-------
FusionLog=>
=== Pre-bind state information ===
LOG: DisplayName = Stimulsoft.Report, Version=2020.5.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a
(Fully-specified)
LOG: Appbase = file:///D:/Projects/WebinarProject/Webinars/Logistics/
LOG: Initial PrivatePath = D:\Projects\WebinarProject\Webinars\Logistics\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Projects\WebinarProject\Webinars\Logistics\web.config
LOG: Using host configuration file: C:\Users\USER\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Stimulsoft.Report, Version=2020.5.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a
LOG: Attempting download of new URL file:///C:/Users/USER/AppData/Local/Temp/Temporary ASP.NET Files/vs/322b9840/5d276d11/Stimulsoft.Report.DLL.
LOG: Attempting download of new URL file:///C:/Users/USER/AppData/Local/Temp/Temporary ASP.NET Files/vs/322b9840/5d276d11/Stimulsoft.Report/Stimulsoft.Report.DLL.
LOG: Attempting download of new URL file:///D:/Projects/WebinarProject/Webinars/Logistics/bin/Stimulsoft.Report.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Build Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Can you help, please?