From 96df113427c7c872207973f94e9b9ae045e33a51 Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Fri, 19 Jul 2024 20:01:35 +0300 Subject: [PATCH] Convert to use Central Package Management * single place to specify used dependency versions --- Directory.Build.props | 6 +--- Directory.Packages.props | 29 +++++++++++++++++++ .../NPOI.Benchmarks/NPOI.Benchmarks.csproj | 2 +- build/_build.csproj | 1 + main/NPOI.Core.csproj | 18 ++++++------ ooxml/NPOI.OOXML.Core.csproj | 6 ++-- solution/NPOI.Core.Test.sln | 6 ++++ testcases/main/NPOI.TestCases.Core.csproj | 8 ++--- .../ooxml/NPOI.OOXML.TestCases.Core.csproj | 10 +++---- .../NPOI.OOXML4Net.TestCases.Core.csproj | 8 ++--- 10 files changed, 63 insertions(+), 31 deletions(-) create mode 100644 Directory.Packages.props diff --git a/Directory.Build.props b/Directory.Build.props index 5a9033579..57775a60e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -36,11 +36,7 @@ - - all - runtime; build; native; contentfiles; analyzers - - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 000000000..f70c716c3 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,29 @@ + + + true + false + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj b/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj index d5cb1c703..081512e76 100644 --- a/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj +++ b/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj @@ -11,7 +11,7 @@ - + diff --git a/build/_build.csproj b/build/_build.csproj index 91a5396c8..660444afd 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -8,6 +8,7 @@ .. .. 1 + false diff --git a/main/NPOI.Core.csproj b/main/NPOI.Core.csproj index 54cc21d1e..9d0e36ce0 100644 --- a/main/NPOI.Core.csproj +++ b/main/NPOI.Core.csproj @@ -14,18 +14,18 @@ - - - - - - - - + + + + + + + + - + diff --git a/ooxml/NPOI.OOXML.Core.csproj b/ooxml/NPOI.OOXML.Core.csproj index 39e6f0ec4..6eae2d675 100644 --- a/ooxml/NPOI.OOXML.Core.csproj +++ b/ooxml/NPOI.OOXML.Core.csproj @@ -1,4 +1,4 @@ - + net472;netstandard2.0;netstandard2.1;net6.0 @@ -26,8 +26,8 @@ - - + + diff --git a/solution/NPOI.Core.Test.sln b/solution/NPOI.Core.Test.sln index 188036c0a..5f99990c8 100644 --- a/solution/NPOI.Core.Test.sln +++ b/solution/NPOI.Core.Test.sln @@ -28,6 +28,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPOI.Benchmarks", "..\bench EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPOI.Pack", "NPOI.Pack.csproj", "{6D7A6E15-C914-4FCA-B8E4-FF5C7437C2E0}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8903A667-CADD-40FE-BEB0-BD7D458615CE}" + ProjectSection(SolutionItems) = preProject + ..\Directory.Build.props = ..\Directory.Build.props + ..\Directory.Packages.props = ..\Directory.Packages.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/testcases/main/NPOI.TestCases.Core.csproj b/testcases/main/NPOI.TestCases.Core.csproj index 99d53cab7..a46e56ae3 100644 --- a/testcases/main/NPOI.TestCases.Core.csproj +++ b/testcases/main/NPOI.TestCases.Core.csproj @@ -15,10 +15,10 @@ - - - - + + + + diff --git a/testcases/ooxml/NPOI.OOXML.TestCases.Core.csproj b/testcases/ooxml/NPOI.OOXML.TestCases.Core.csproj index 0f9f42b66..235c5f72a 100644 --- a/testcases/ooxml/NPOI.OOXML.TestCases.Core.csproj +++ b/testcases/ooxml/NPOI.OOXML.TestCases.Core.csproj @@ -21,11 +21,11 @@ - - - - - + + + + + diff --git a/testcases/openxml4net/NPOI.OOXML4Net.TestCases.Core.csproj b/testcases/openxml4net/NPOI.OOXML4Net.TestCases.Core.csproj index cc98b75e4..3d3c2df06 100644 --- a/testcases/openxml4net/NPOI.OOXML4Net.TestCases.Core.csproj +++ b/testcases/openxml4net/NPOI.OOXML4Net.TestCases.Core.csproj @@ -10,10 +10,10 @@ - - - - + + + +