-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Net Core 2.2, 3.0, 3.1 and Net Standard 2.1 targets #610
base: master
Are you sure you want to change the base?
Conversation
… dimensions are not publicly available. Override the ReadUntil method to include depth: While reading a sheet, the mergedCells property isn't always loaded due to tags matching the incoming tag array. Matching with depth resolves this.
Convert short to int because we were overflowing the value and this was causing and index out of bounds exception when accessing an array. Eliminated unnecessary cast
…arning errors, like "Number Stored as Text" or "Two Digit Text Year"
<AssemblyVersion>4.5.3.2</AssemblyVersion> | ||
<FileVersion>4.5.3.2</FileVersion> | ||
<Version>4.5.3.2</Version> | ||
<TargetFrameworks>netcoreapp3.1;netcoreapp3.0;netstandard2.1;netcoreapp2.2;netcoreapp2.1;netstandard2.0;net40</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you want to target netstandard2.1 and netstandard2.0? Wouldn't it just be better to keep the lower version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about it, but ultimately decided to add several different targets because some projects I've seen or worked on do target them directly. For instance, I was unable to use any version of EPPlus on .Net Core 3.1 (the project required the use of .Net Core 3.1 because WPF and XAML Islands)
About netstandard2.1 and 2.0: Microsoft recommends that any new .Net project should target either the latest .Net Core release (3.1) or the latest .Net Standard release (2.1), and discourages targeting older frameworks, unless necessary. But still, I've found issues trying to make EPPlus (both .Net Core 2.1 and .Net Standard 2.0) work on newer targets. So, to properly cover as much platforms as possible, I decided to directly target them in the .csproj file, without sacrificing existing projects that may depend on a specific framework version.
Also, I think that nstd2.1 is basically nc3.0 without Microsoft-specific stuff, nstd2.0 was based of nc2.0, and nc2.2 and 3.0 are actually, really different. It was just to be sure that it would work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think multi-targeting the various net core versions makes a lot of sense. I had just not considered targeting multiple net standard versions before. But with netstandard likely going away with dotnet 5, this may be an unnecessary concern.
Fixed problem with namespace prefix for sheetData tag in worksheet.
Async methods
Fixed issue in formula match
Add properties for image dimensions
Prevent index out of array bounds exception
REPAIRED METHOD - internal ExcelBorderItemXml Copy()
Compilation targets were added to the csproj file to target newer Net Core versions 2.2, 3.0 and 3.1, and also Net Standard 2.1. Some package references were updated as well.
A small code change was necesary to differentiate between types System.Index and OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup.Index when compiling for Net Core 3 and up.
Unit tests were unchanged, as no functional changes were made to the source code.