Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

AutoFitColumns throw a Exception Could not load file or assembly 'System.Drawing.Common, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 #594

Open
haoas opened this issue Dec 15, 2019 · 2 comments

Comments

@haoas
Copy link

haoas commented Dec 15, 2019

.net core 2.2 app export a excel file throw bellow exception:
{"Error":{"Code":"Exception","Message":"Could not load file or assembly 'System.Drawing.Common, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)","Details":"System.IO.FileLoadException: Could not load file or assembly 'System.Drawing.Common, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)\r\nFile name: 'System.Drawing.Common, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'\r\n at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth)\r\n

@haoas
Copy link
Author

haoas commented Dec 15, 2019

4.5.3.2 has the above problem,i downgrade to 4.5.3,it works well.

@TheRealAyCe
Copy link

4.5.3.2 has the above problem,i downgrade to 4.5.3,it works well.

Thanks, I had the same problem. This fixed it for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants