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
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
354c844
REPAIRED METHOD - internal ExcelBorderItemXml Copy()
Sep 5, 2018
1ef3966
Add properties for image dimensions: Properties for a resized image's…
Jun 7, 2019
fb1f7e0
Prevent index out of array bounds exception
mason-mcglothlin Jun 7, 2019
1ddba00
Fixed issue in formula match
leonardopinho Jul 13, 2019
f1e36ae
Fix issue #152 Posibility to ignore Microsoft Excel cells warning err…
romcode Sep 3, 2019
03c8dca
Added async method one ExcelPackage
bhugot Dec 5, 2019
2e140bb
changed FileStream creation
bhugot Dec 5, 2019
aa9e9ca
Add Net Core 2.2, 3.0, 3.1 and Net Standard 2.1 targets
TheXDS Jan 15, 2020
c51ce64
Removal of net35 target
TheXDS Jan 15, 2020
1ff6e5d
Fixed problem with namespace prefix for sheetData tag in worksheet.
Michael-Greiner Jan 16, 2020
0d692a2
Merge branch 'master' into master
TheXDS Jan 30, 2020
4938e05
Removal of duplicate propertygroup for netstd2.1
TheXDS Jan 30, 2020
fe2a890
Merge pull request #1 from Michael-Greiner/master
TheXDS Jan 30, 2020
1422d3a
Merge pull request #2 from bhugot/Async_Methods
TheXDS Jan 30, 2020
ad573a5
Merge pull request #3 from romcode/manage-cells-warning-errors
TheXDS Jan 30, 2020
e6e79bc
Merge pull request #4 from leonardopinho/master
TheXDS Jan 30, 2020
7b48a5a
Merge pull request #5 from billgeek/MergeCellsFix
TheXDS Jan 30, 2020
d755ae1
Merge pull request #6 from mason-mcglothlin/master
TheXDS Jan 30, 2020
bf92ef1
Merge pull request #7 from PeterHevesi/ExcelBorderItemXml_Fix
TheXDS Jan 30, 2020
a277715
Minor compilation fixes
TheXDS Jan 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 59 additions & 15 deletions EPPlus/EPPlus.MultiTarget.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netstandard2.0;net35;net40</TargetFrameworks>
<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.

<AssemblyVersion>4.5.3.3</AssemblyVersion>
<FileVersion>4.5.3.3</FileVersion>
<Version>4.5.3.3</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseUrl>https://licenses.nuget.org/LGPL-3.0-or-later</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/JanKallman/EPPlus</PackageProjectUrl>
Expand All @@ -17,7 +17,7 @@
<RepositoryUrl></RepositoryUrl>
<PackageTags>Excel ooxml</PackageTags>
<Copyright>Jan Källman 2018</Copyright>
<PackageReleaseNotes>EPPlus 4.5.3.2
<PackageReleaseNotes>EPPlus 4.5.3.3

New features in version 4.5:
* .NET Core support
Expand Down Expand Up @@ -234,6 +234,23 @@ Release Candidate changes
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
<DefineConstants>Core</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1'">
<DefineConstants>Core;STANDARD20</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>Core</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0'">
<DefineConstants>Core</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2'">
<DefineConstants>Core</DefineConstants>
</PropertyGroup>


<PropertyGroup Condition=" '$(TargetFramework)' == 'net35'">
<DefineConstants>NET35;NETFULL</DefineConstants>
Expand Down Expand Up @@ -280,26 +297,53 @@ Release Candidate changes
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.1" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="System.Drawing.Common">
<Version>4.5.1</Version>
</PackageReference>
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.Security.Claims" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.5.1" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="System.Drawing.Common" Version="4.6.0-preview6.19303.8" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.5.2" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.2'">
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 7 additions & 10 deletions EPPlus/FormulaParsing/Excel/Functions/BuiltInFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,17 @@
* Author Change Date
*******************************************************************************
* Mats Alm Added 2013-12-03
* César Morgan Fixing of namespaces 2020-01-14
*******************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Database;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Finance;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Numeric;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Finance;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;

namespace OfficeOpenXml.FormulaParsing.Excel.Functions
{
Expand Down Expand Up @@ -167,7 +164,7 @@ public BuiltInFunctions()
Functions["column"] = new Column();
Functions["columns"] = new Columns();
Functions["choose"] = new Choose();
Functions["index"] = new Index();
Functions["index"] = new RefAndLookup.Index();
Functions["indirect"] = new Indirect();
Functions["offset"] = new Offset();
// Date
Expand Down