I just upgraded from Aspose.Cells 19.1.0 to 19.2.0 and ran my unit tests. I get the following error from Aspose.Cells:
System.IO.FileNotFoundException : Could not load file or assembly 'System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
at Aspose.Cells.WorksheetCollection.\u000f()
at Aspose.Cells.WorksheetCollection.\u0005(Int32 \u0002)
at Aspose.Cells.Workbook..ctor(FileFormatType fileFormatType)
at ... my code
I have tried this scenario in my sample project but could not observe this issue with the latest version
Aspose.Cells v19.2.0. Please share a simplest project (runnable solution) which can be used here for reproducing this issue. We will analyze this problem using your sample project and provide our feedback.
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Aspose.Cells.WorksheetCollection.()
at Aspose.Cells.WorksheetCollection.(Int32 )
at Aspose.Cells.Workbook..ctor(FileFormatType fileFormatType)
at AsposeCellBug.Program.Main(String[] args) in C:\dev\scrap\AsposeCellBug\AsposeCellBug\Program.cs:line 9
We have investigated the issue more and observed that you are right that these dependencies are required now with v19.2.x, however these were not required in v19.1. You may please add System.Drawing.Common from the NuGet package manager to resolve this issue.
In some cases you may also require System.Text.Encoding, however while using NuGet package manager, it automatically fetches all the required dependencies based upon the API calls used in the application.
We are sorry for the inconvenience caused to you in this regard.
Glad to hear that I’m not crazy
The Release Notes should mention extra dependencies like that. It’s a “breaking” change (i.e. we need to change something more than just update)
Well, 19.1.0 has System.Drawing.Common too listed as dependency on the NuGet package page yet it does not crash without it: NuGet Gallery | Aspose.Cells 19.1.0 (I’m guessing that it was only actually used when using Graph or Charts)
@dstj,
Well you are right that dependency is there when graphs or charts are processed in the newer version. Regarding its information in the release notes, these notes contain information about bugs, enhancements and exceptions which are reported by users. Similarly these release notes contain the deprecated calls and any changes in syntax or new API calls. As this specific change of dependency under discussion does not lie under any of these sections, so it is not there.
Adding reference to System.Drawing.Common 4.5.0 as nuget manually is not solving the problem.
Project is netstandard2.0 and we use Aspose.Cells 19.3.0 and still get error message: System.IO.FileLoadException: Could not load file or assembly 'System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Dependencies for Aspose.Cells say they need version 4.5.0 of System.Drawing.Common, but the error messages seems like it looks for version 4.0.0.
@torstenmandelkow,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.
This issue has been logged as
CELLSNETCORE-24 - Issue while installing Aspose.Cells for .NET Core v19.3 from NuGet package manager
Please manually install System.Drawing.common 4.5.1 after installing Aspose.Cells 19.3.0 as a temporary way to solve the exception. We will fix this problem in Aspose.Cells 19.4.0.