From a687fea818b4bb2cfa6868dc01d9be2afc977674 Mon Sep 17 00:00:00 2001 From: Taylor Southwick Date: Wed, 28 Jun 2023 13:06:50 -0700 Subject: [PATCH 1/5] Remove explicit System.IO.Packaging for SDK --- Directory.Build.props | 2 + src/Directory.Build.targets | 5 +++ .../DocumentFormat.OpenXml.Framework.csproj | 43 ++----------------- .../DocumentFormat.OpenXml.Linq.csproj | 29 ++----------- .../DocumentFormat.OpenXml.csproj | 41 ------------------ src/PEVerify.targets | 5 +-- 6 files changed, 15 insertions(+), 110 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index bd7b93e95..81fcd1e79 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -111,6 +111,8 @@ true false + false + true diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 37c38eb67..a54c811f0 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -6,6 +6,11 @@ + + + + + diff --git a/src/DocumentFormat.OpenXml.Framework/DocumentFormat.OpenXml.Framework.csproj b/src/DocumentFormat.OpenXml.Framework/DocumentFormat.OpenXml.Framework.csproj index 827d4f7b6..7056060ed 100644 --- a/src/DocumentFormat.OpenXml.Framework/DocumentFormat.OpenXml.Framework.csproj +++ b/src/DocumentFormat.OpenXml.Framework/DocumentFormat.OpenXml.Framework.csproj @@ -29,46 +29,9 @@ DocumentFormat.OpenXml - - - - true - - - - - - - - - - - true - - - - - - - - - - - true - - - - - - - - - - - - - - + + + diff --git a/src/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Linq.csproj b/src/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Linq.csproj index c63ba6436..eaacabd1a 100644 --- a/src/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Linq.csproj +++ b/src/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Linq.csproj @@ -18,31 +18,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/src/DocumentFormat.OpenXml/DocumentFormat.OpenXml.csproj b/src/DocumentFormat.OpenXml/DocumentFormat.OpenXml.csproj index 4111704be..fa95a4533 100644 --- a/src/DocumentFormat.OpenXml/DocumentFormat.OpenXml.csproj +++ b/src/DocumentFormat.OpenXml/DocumentFormat.OpenXml.csproj @@ -35,45 +35,4 @@ - - - - true - - - - - - - - - - - true - - - - - - - - - - - true - - - - - - - - - - - - - - - diff --git a/src/PEVerify.targets b/src/PEVerify.targets index 6eac1f70b..9fd5db179 100644 --- a/src/PEVerify.targets +++ b/src/PEVerify.targets @@ -3,15 +3,14 @@ false - false C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\PEVerify.exe - + $(Features);peverify-compat - + <_OutputFileToVerify Include="@(FileWrites)" Condition="'%(Extension)' == '.dll' AND $([System.Text.RegularExpressions.Regex]::IsMatch('%(FullPath)', '.+\\bin\\.+'))" /> From f2457bcfb10212196d703eb54a73b28353ec6f34 Mon Sep 17 00:00:00 2001 From: Taylor Southwick Date: Wed, 28 Jun 2023 13:08:42 -0700 Subject: [PATCH 2/5] some more --- Directory.Build.targets | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 04a1bd894..2819041fb 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -11,6 +11,7 @@ all runtime; build; native; contentfiles; analyzers + @@ -27,7 +28,4 @@ $(MSBuildThisFileDirectory)bin\$(Configuration)\packages\ $(PackageOutputPath)shipping\ - - - \ No newline at end of file From 72857827805981c2e7d95b5f33fd2e2733c27926 Mon Sep 17 00:00:00 2001 From: Taylor Southwick Date: Wed, 28 Jun 2023 13:12:23 -0700 Subject: [PATCH 3/5] fix expression --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 81fcd1e79..e509fffdd 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -112,7 +112,7 @@ true false false - true + true From 1bb6e802c0571931e4a8cdeb5a8962ee5a1bab78 Mon Sep 17 00:00:00 2001 From: Taylor Southwick Date: Wed, 28 Jun 2023 15:54:14 -0700 Subject: [PATCH 4/5] fix up --- .github/workflows/benchmarks.yml | 2 +- test/Directory.Build.targets | 1 - .../DocumentFormat.OpenXml.Benchmarks.csproj | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 0a2d2dfaf..711807608 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -22,7 +22,7 @@ jobs: run: cd test/DocumentFormat.OpenXml.Benchmarks; dotnet build -c RELEASE shell: pwsh - name: Run benchmarks - run: cd test/DocumentFormat.OpenXml.Benchmarks; dotnet run -c RELEASE -- results --exporters json --filter '*' + run: cd test/DocumentFormat.OpenXml.Benchmarks; dotnet run -c RELEASE -f net7.0 -- results --exporters json --filter '*' shell: pwsh - name: Write summary shell: pwsh diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index 41854135c..547c242c6 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -12,7 +12,6 @@ - diff --git a/test/DocumentFormat.OpenXml.Benchmarks/DocumentFormat.OpenXml.Benchmarks.csproj b/test/DocumentFormat.OpenXml.Benchmarks/DocumentFormat.OpenXml.Benchmarks.csproj index 48cfc448e..c127bd99c 100644 --- a/test/DocumentFormat.OpenXml.Benchmarks/DocumentFormat.OpenXml.Benchmarks.csproj +++ b/test/DocumentFormat.OpenXml.Benchmarks/DocumentFormat.OpenXml.Benchmarks.csproj @@ -1,6 +1,6 @@  - $(LatestTargetFramework) + $(LatestTargetFramework) Exe From ad729670c20fef64d6b48b3795854ec8a05135f1 Mon Sep 17 00:00:00 2001 From: Taylor Southwick Date: Wed, 28 Jun 2023 16:16:21 -0700 Subject: [PATCH 5/5] support peverify --- .../ParagraphId/ParagraphIdOptions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DocumentFormat.OpenXml.Features/ParagraphId/ParagraphIdOptions.cs b/src/DocumentFormat.OpenXml.Features/ParagraphId/ParagraphIdOptions.cs index b5fad7e8f..856e6be9a 100644 --- a/src/DocumentFormat.OpenXml.Features/ParagraphId/ParagraphIdOptions.cs +++ b/src/DocumentFormat.OpenXml.Features/ParagraphId/ParagraphIdOptions.cs @@ -9,13 +9,13 @@ namespace DocumentFormat.OpenXml.Features public class ParagraphIdOptions { /// - /// Gets a value indicating whether or not paragraph ids should be auto-generated on elements. + /// Gets or sets a value indicating whether or not paragraph ids should be auto-generated on elements. /// - public bool AutoGenerateIds { get; init; } = true; + public bool AutoGenerateIds { get; set; } = true; /// - /// Gets a value indicating whether or not uniqueness should be guaranteed on elements added to the document. This will change a node's para id if it has already been registered. + /// Gets or sets a value indicating whether or not uniqueness should be guaranteed on elements added to the document. This will change a node's para id if it has already been registered. /// - public bool EnsureUniquenessOnExistingNodes { get; init; } = true; + public bool EnsureUniquenessOnExistingNodes { get; set; } = true; } }