Skip to content

Commit eef9506

Browse files
palluPankraty
andauthored
Update to ClosedXML version 0.96; drop ClosedXML.Report.Signed (#286)
* Updated to ClosedXML latest * Sign the assembly; drop ClosedXML.Report.Signed support * Remove Release.Signed configuration from AppVeyor * Chage version to 0.2.5 Co-authored-by: Aleksei <pankraty@gmail.com>
1 parent e54f121 commit eef9506

File tree

9 files changed

+45
-74
lines changed

9 files changed

+45
-74
lines changed

ClosedXML.Report.sln

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,15 @@ EndProject
1414
Global
1515
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1616
Debug|Any CPU = Debug|Any CPU
17-
Release.Signed|Any CPU = Release.Signed|Any CPU
1817
Release|Any CPU = Release|Any CPU
1918
EndGlobalSection
2019
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2120
{DEF4A219-D1CF-42A2-A5AC-FE7F2F005AB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2221
{DEF4A219-D1CF-42A2-A5AC-FE7F2F005AB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
23-
{DEF4A219-D1CF-42A2-A5AC-FE7F2F005AB0}.Release.Signed|Any CPU.ActiveCfg = Release.Signed|Any CPU
24-
{DEF4A219-D1CF-42A2-A5AC-FE7F2F005AB0}.Release.Signed|Any CPU.Build.0 = Release.Signed|Any CPU
2522
{DEF4A219-D1CF-42A2-A5AC-FE7F2F005AB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
2623
{DEF4A219-D1CF-42A2-A5AC-FE7F2F005AB0}.Release|Any CPU.Build.0 = Release|Any CPU
2724
{D529A371-3AEA-4D02-9A0D-308A6276D411}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2825
{D529A371-3AEA-4D02-9A0D-308A6276D411}.Debug|Any CPU.Build.0 = Debug|Any CPU
29-
{D529A371-3AEA-4D02-9A0D-308A6276D411}.Release.Signed|Any CPU.ActiveCfg = Release.Signed|Any CPU
30-
{D529A371-3AEA-4D02-9A0D-308A6276D411}.Release.Signed|Any CPU.Build.0 = Release.Signed|Any CPU
3126
{D529A371-3AEA-4D02-9A0D-308A6276D411}.Release|Any CPU.ActiveCfg = Release|Any CPU
3227
{D529A371-3AEA-4D02-9A0D-308A6276D411}.Release|Any CPU.Build.0 = Release|Any CPU
3328
EndGlobalSection

ClosedXML.Report/ClosedXML.Report.csproj

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
<LangVersion>Latest</LangVersion>
66
<AssemblyName>ClosedXML.Report</AssemblyName>
77
<PackageId>ClosedXML.Report</PackageId>
8-
<Configurations>Debug;Release;Release.Signed</Configurations>
8+
<Configurations>Debug;Release</Configurations>
99
<PackageLicenseUrl></PackageLicenseUrl>
1010
<PackageProjectUrl>https://github.com/ClosedXML/ClosedXML.Report</PackageProjectUrl>
1111
<RepositoryUrl>https://github.com/ClosedXML/ClosedXML.Report</RepositoryUrl>
1212
<Authors>Alexey Rozhkov</Authors>
1313
<Copyright>MIT</Copyright>
14-
<Version>0.2.0.0</Version>
1514
<Product>ClosedXML.Report</Product>
1615
<PackageReleaseNotes>See https://github.com/ClosedXML/ClosedXML.Report/releases/tag/$(productVersion)</PackageReleaseNotes>
1716
<Description>ClosedXML.Report is a tool for report generation and data analysis in .NET applications through the use of Microsoft Excel. ClosedXML.Report is a .NET-library for report generation Microsoft Excel without requiring Excel to be installed on the machine that's running the code.</Description>
@@ -30,22 +29,14 @@
3029
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
3130
<IncludeSymbols>true</IncludeSymbols>
3231
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
33-
</PropertyGroup>
34-
35-
<PropertyGroup Condition="'$(Configuration)'=='Release.Signed'">
36-
<PackageId>ClosedXML.Report.Signed</PackageId>
37-
<OutputPath>bin\Release.Signed\</OutputPath>
38-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
39-
<Optimize>true</Optimize>
4032
<SignAssembly>true</SignAssembly>
4133
<AssemblyOriginatorKeyFile>ClosedXML.Report.snk</AssemblyOriginatorKeyFile>
42-
<DefineConstants>$(DefineConstants);RELEASE;STRONGNAME</DefineConstants>
4334
</PropertyGroup>
4435

4536
<PropertyGroup Condition="'$(Configuration)'=='Release'">
4637
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
4738
</PropertyGroup>
48-
39+
4940
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
5041
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
5142
</PropertyGroup>
@@ -59,10 +50,9 @@
5950
</PropertyGroup>
6051

6152
<ItemGroup>
62-
<PackageReference Include="ClosedXML.Signed" Version="0.95.0" Condition="'$(Configuration)'=='Release.Signed'" />
63-
<PackageReference Include="ClosedXML" Version="0.95.4" Condition="'$(Configuration)'!='Release.Signed'" />
53+
<PackageReference Include="ClosedXML" Version="0.96.0" />
6454
<PackageReference Include="morelinq" Version="3.3.2" />
65-
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.18" />
55+
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.20" />
6656
</ItemGroup>
6757

6858
</Project>
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
using System.Runtime.CompilerServices;
22

33
// Tests accessing
4-
#if STRONGNAME
54
[assembly: InternalsVisibleTo("ClosedXML.Report.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001002b89cad160592ac2770c3651edc6b07038b8d00544858ab632e767ba4052afbdfb4c7fc18deb924b3aea7ecceca8b394e2b14cb9d98e780c8e6159dcb62da75d99f1e1e583ad078ac4836275c58c0cbb786ed317a9a6ac7fa70a9355a88bc41b9f8cf5d5547020c6f02eca4ecf01e1db5d84c6e6788b103064cdd78e14a3c0b2")]
6-
#else
7-
[assembly: InternalsVisibleTo("ClosedXML.Report.Tests")]
8-
#endif

ClosedXML.Report/RangeInterpreter.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,24 +147,24 @@ string EvalString(string str)
147147

148148
if (cell.HasComment)
149149
{
150-
var comment = EvalString(cell.Comment.Text);
151-
cell.Comment.ClearText();
152-
cell.Comment.AddText(comment);
150+
var comment = EvalString(cell.GetComment().Text);
151+
cell.GetComment().ClearText();
152+
cell.GetComment().AddText(comment);
153153
}
154154

155155
if (cell.HasHyperlink)
156156
{
157-
if (cell.Hyperlink.IsExternal)
158-
cell.Hyperlink.ExternalAddress = new Uri(EvalString(cell.Hyperlink.ExternalAddress.ToString()));
157+
if (cell.GetHyperlink().IsExternal)
158+
cell.GetHyperlink().ExternalAddress = new Uri(EvalString(cell.GetHyperlink().ExternalAddress.ToString()));
159159
else
160-
cell.Hyperlink.InternalAddress = EvalString(cell.Hyperlink.InternalAddress);
160+
cell.GetHyperlink().InternalAddress = EvalString(cell.GetHyperlink().InternalAddress);
161161
}
162162

163163
if (cell.HasRichText)
164164
{
165-
var richText = EvalString(cell.RichText.Text);
166-
cell.RichText.ClearText();
167-
cell.RichText.AddText(richText);
165+
var richText = EvalString(cell.GetRichText().Text);
166+
cell.GetRichText().ClearText();
167+
cell.GetRichText().AddText(richText);
168168
}
169169
}
170170

ClosedXML.Report/RangeTemplate.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -335,24 +335,24 @@ string EvalString(string str)
335335

336336
if (xlCell.HasComment)
337337
{
338-
var comment = EvalString(xlCell.Comment.Text);
339-
xlCell.Comment.ClearText();
340-
xlCell.Comment.AddText(comment);
338+
var comment = EvalString(xlCell.GetComment().Text);
339+
xlCell.GetComment().ClearText();
340+
xlCell.GetComment().AddText(comment);
341341
}
342342

343343
if (xlCell.HasHyperlink)
344344
{
345-
if (xlCell.Hyperlink.IsExternal)
346-
xlCell.Hyperlink.ExternalAddress = new Uri(EvalString(xlCell.Hyperlink.ExternalAddress.ToString()));
345+
if (xlCell.GetHyperlink().IsExternal)
346+
xlCell.GetHyperlink().ExternalAddress = new Uri(EvalString(xlCell.GetHyperlink().ExternalAddress.ToString()));
347347
else
348-
xlCell.Hyperlink.InternalAddress = EvalString(xlCell.Hyperlink.InternalAddress);
348+
xlCell.GetHyperlink().InternalAddress = EvalString(xlCell.GetHyperlink().InternalAddress);
349349
}
350350

351351
if (xlCell.HasRichText)
352352
{
353-
var richText = EvalString(xlCell.RichText.Text);
354-
xlCell.RichText.ClearText();
355-
xlCell.RichText.AddText(richText);
353+
var richText = EvalString(xlCell.GetRichText().Text);
354+
xlCell.GetRichText().ClearText();
355+
xlCell.GetRichText().AddText(richText);
356356
}
357357
}
358358

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ To install ClosedXML.Report, run the following command in the Package Manager Co
2828
```
2929
PM> Install-Package ClosedXML.Report
3030
```
31-
or if you have a signed assembly, then use:
32-
```
33-
PM> Install-Package ClosedXML.Report.Signed
34-
```
3531

3632
## Features
3733

appveyor.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# common configuration for ALL branches
22

3-
version: 0.2.0.{build}
3+
version: 0.2.5.{build}
44

55
pull_requests:
66
do_not_increment_build_number: true
@@ -27,7 +27,6 @@ init:
2727
$env:fileVersion = $env:APPVEYOR_BUILD_VERSION -replace '(\d+)\.(\d+)\.([^.]+)\.(\d+)', '$1.$2.999.$4'
2828
$env:productVersion = $env:fileVersion
2929
}
30-
$env:signed = $env:CONFIGURATION.Substring(7)
3130
3231
Update-AppveyorBuild -Version $env:fileVersion
3332
@@ -49,7 +48,6 @@ dotnet_csproj:
4948
# platform: Any CPU
5049
configuration:
5150
- Release
52-
- Release.Signed
5351

5452
before_build:
5553
- cmd: nuget update -self
@@ -62,7 +60,7 @@ test_script:
6260
- dotnet test tests/ClosedXML.Report.Tests
6361
after_build:
6462
- cd ClosedXML.Report/bin/%CONFIGURATION%/
65-
- 7z a ClosedXML.Report%signed%_%productVersion%.zip */ClosedXML.Report.dll
63+
- 7z a ClosedXML.Report_%productVersion%.zip */ClosedXML.Report.dll
6664
- cd ../../../
6765

6866
artifacts:
@@ -88,4 +86,4 @@ deploy:
8886
api_key:
8987
secure: GZMuY+C0BuVSLsTJ0b2oLNVNXdd8ffaFJapOaUDKlrfOLmrHc0S44AqSE6pjK1yC
9088
on:
91-
APPVEYOR_REPO_TAG: true
89+
APPVEYOR_REPO_TAG: true

tests/ClosedXML.Report.Tests/ClosedXML.Report.Tests.csproj

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,45 @@
22
<PropertyGroup>
33
<TargetFrameworks>net462;net6.0</TargetFrameworks>
44
<LangVersion>Latest</LangVersion>
5-
<Configurations>Debug;Release;Release.Signed</Configurations>
5+
<Configurations>Debug;Release</Configurations>
66
<PackageLicenseUrl>https://github.com/ClosedXML/ClosedXML.Report/blob/master/LICENSE</PackageLicenseUrl>
77
<PackageProjectUrl>https://github.com/ClosedXML/ClosedXML.Report</PackageProjectUrl>
88
<RepositoryUrl>https://github.com/ClosedXML/ClosedXML.Report</RepositoryUrl>
99
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
1010
<Authors>Alexey Rozhkov</Authors>
1111
<Copyright>MIT</Copyright>
1212
<Version>0.1.0.0</Version>
13-
</PropertyGroup>
14-
15-
<PropertyGroup Condition="'$(Configuration)'=='Release.Signed'">
16-
<OutputPath>bin\Release.Signed\</OutputPath>
17-
<Optimize>true</Optimize>
1813
<SignAssembly>true</SignAssembly>
1914
<AssemblyOriginatorKeyFile>ClosedXML.Report.snk</AssemblyOriginatorKeyFile>
20-
<DefineConstants>$(DefineConstants);RELEASE;STRONGNAME</DefineConstants>
15+
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
2116
</PropertyGroup>
2217

2318
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
2419
<PlatformTarget>AnyCPU</PlatformTarget>
2520
</PropertyGroup>
26-
21+
2722
<ItemGroup>
2823
<Compile Remove="FiledBuilderTests.cs" />
2924
</ItemGroup>
3025

3126
<ItemGroup>
3227
<PackageReference Include="Bogus" Version="34.0.2" />
28+
<PackageReference Include="ClosedXML" Version="0.96.0" />
3329
<PackageReference Include="DocumentFormat.OpenXml" Version="2.16.0" />
3430
<PackageReference Include="FluentAssertions" Version="6.7.0" />
35-
<PackageReference Include="linq2db" Version="3.7.0" />
36-
<PackageReference Include="linq2db.SQLite" Version="3.7.0" />
37-
<PackageReference Include="linq2db.t4models" Version="3.7.0" />
31+
<PackageReference Include="linq2db" Version="4.3.0" />
32+
<PackageReference Include="linq2db.SQLite" Version="4.3.0" />
33+
<PackageReference Include="linq2db.t4models" Version="4.3.0" />
3834
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
39-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
40-
<PackageReference Include="NSubstitute" Version="4.3.0" />
41-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
42-
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.18" />
35+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
36+
<PackageReference Include="NSubstitute" Version="4.4.0" />
37+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
38+
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.20" />
4339
<PackageReference Include="System.Resources.Extensions" Version="6.0.0" />
44-
<PackageReference Include="System.ServiceModel.Primitives" Version="4.9.0" />
45-
<PackageReference Include="xunit" Version="2.4.1" />
46-
<PackageReference Include="xunit.assert" Version="2.4.1" />
47-
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
40+
<PackageReference Include="System.ServiceModel.Primitives" Version="4.10.0" />
41+
<PackageReference Include="xunit" Version="2.4.2" />
42+
<PackageReference Include="xunit.assert" Version="2.4.2" />
43+
<PackageReference Include="xunit.extensibility.execution" Version="2.4.2" />
4844
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
4945
<PrivateAssets>all</PrivateAssets>
5046
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -79,4 +75,4 @@
7975
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
8076
</None>
8177
</ItemGroup>
82-
</Project>
78+
</Project>

tests/ClosedXML.Report.Tests/XlsxTemplateTestsBase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,28 +136,28 @@ protected bool WorksheetsAreEqual(IXLWorksheet expected, IXLWorksheet actual, ou
136136
}
137137

138138
if (expectedCell.HasComment != actualCell.HasComment
139-
|| (expectedCell.HasComment && !Equals(expectedCell.Comment, actualCell.Comment)))
139+
|| (expectedCell.HasComment && !Equals(expectedCell.GetComment(), actualCell.GetComment())))
140140
{
141141
messages.Add($"Cell comments are not equal starting from {address}");
142142
cellsAreEqual = false;
143143
}
144144

145145
if (expectedCell.HasHyperlink != actualCell.HasHyperlink
146-
|| (expectedCell.HasHyperlink && !Equals(expectedCell.Hyperlink, actualCell.Hyperlink)))
146+
|| (expectedCell.HasHyperlink && !Equals(expectedCell.GetHyperlink(), actualCell.GetHyperlink())))
147147
{
148148
messages.Add($"Cell Hyperlink are not equal starting from {address}");
149149
cellsAreEqual = false;
150150
}
151151

152152
if (expectedCell.HasRichText != actualCell.HasRichText
153-
|| (expectedCell.HasRichText && !expectedCell.RichText.Equals(actualCell.RichText)))
153+
|| (expectedCell.HasRichText && !expectedCell.GetRichText().Equals(actualCell.GetRichText())))
154154
{
155155
messages.Add($"Cell RichText are not equal starting from {address}");
156156
cellsAreEqual = false;
157157
}
158158

159159
if (expectedCell.HasDataValidation != actualCell.HasDataValidation
160-
|| (expectedCell.HasDataValidation && !Equals(expectedCell.DataValidation, actualCell.DataValidation)))
160+
|| (expectedCell.HasDataValidation && !Equals(expectedCell.GetDataValidation(), actualCell.GetDataValidation())))
161161
{
162162
messages.Add($"Cell DataValidation are not equal starting from {address}");
163163
cellsAreEqual = false;

0 commit comments

Comments
 (0)