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

Add Net Core 2.2, 3.0, 3.1 and Net Standard 2.1 targets #610

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

TheXDS
Copy link

@TheXDS TheXDS commented Jan 15, 2020

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.

peter.hevesi and others added 10 commits September 5, 2018 15:47
… 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>

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?

Copy link
Author

@TheXDS TheXDS Jan 29, 2020

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.

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.

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

Successfully merging this pull request may close these issues.

7 participants