From 0c855f1df586584e30a2b61541bae5fe1a720f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Fri, 31 Jan 2025 12:09:12 +0100 Subject: [PATCH] refactor: use central package management (#1198) Switch to use [central package management](https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management) by adding a `Directory.Packages.props` and add all package version information there. --- Directory.Build.props | 6 ++--- Directory.Packages.props | 27 +++++++++++++++++++ System.IO.Abstractions.sln | 1 + ...O.System.IO.Abstractions.Benchmarks.csproj | 4 +-- ...stem.IO.Abstractions.TestingHelpers.csproj | 4 +-- ...eIO.System.IO.Abstractions.Wrappers.csproj | 4 +-- .../TestableIO.System.IO.Abstractions.csproj | 4 +-- ...O.Abstractions.TestingHelpers.Tests.csproj | 14 +++++----- ...stem.IO.Abstractions.Wrappers.Tests.csproj | 16 +++++------ 9 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 Directory.Packages.props diff --git a/Directory.Build.props b/Directory.Build.props index e10731833..86d0bc91c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,12 +18,12 @@ $(DefineConstants);FEATURE_SERIALIZABLE - + runtime; build; native; contentfiles; analyzers all - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 000000000..774588cd9 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,27 @@ + + + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/System.IO.Abstractions.sln b/System.IO.Abstractions.sln index 5d5eee5ed..bfa242190 100644 --- a/System.IO.Abstractions.sln +++ b/System.IO.Abstractions.sln @@ -28,6 +28,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{BBF7AD8D-5522-48 global.json = global.json README.md = README.md version.json = version.json + Directory.Packages.props = Directory.Packages.props EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{2BE9161B-A3F3-4511-81DB-DB1DCB6375C9}" diff --git a/benchmarks/TestableIO.System.IO.Abstractions.Benchmarks/TestableIO.System.IO.Abstractions.Benchmarks.csproj b/benchmarks/TestableIO.System.IO.Abstractions.Benchmarks/TestableIO.System.IO.Abstractions.Benchmarks.csproj index 02d9403cc..11ac7f094 100644 --- a/benchmarks/TestableIO.System.IO.Abstractions.Benchmarks/TestableIO.System.IO.Abstractions.Benchmarks.csproj +++ b/benchmarks/TestableIO.System.IO.Abstractions.Benchmarks/TestableIO.System.IO.Abstractions.Benchmarks.csproj @@ -17,10 +17,10 @@ - + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj b/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj index 00fcd9ade..f6b1bf41c 100644 --- a/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj +++ b/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj @@ -11,11 +11,11 @@ - + all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj b/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj index 4a7df59d2..06b22589d 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj @@ -7,10 +7,10 @@ icon_256x256.png - + - + all runtime; build; native; contentfiles; analyzers diff --git a/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj b/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj index 496131822..a688bfb58 100644 --- a/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj +++ b/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj @@ -9,11 +9,11 @@ preview - + all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj b/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj index 8cf5c14d3..14c930142 100644 --- a/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj +++ b/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj @@ -27,19 +27,19 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/TestableIO.System.IO.Abstractions.Wrappers.Tests.csproj b/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/TestableIO.System.IO.Abstractions.Wrappers.Tests.csproj index 24212053b..b096c95cd 100644 --- a/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/TestableIO.System.IO.Abstractions.Wrappers.Tests.csproj +++ b/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/TestableIO.System.IO.Abstractions.Wrappers.Tests.csproj @@ -12,17 +12,17 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - - + + + + + + +