From fbacc4baf6317d4408f851ea82ac297996874a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Mon, 17 Jul 2023 16:08:16 +0200 Subject: [PATCH] refactor: Use central package management (#316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://devblogs.microsoft.com/nuget/introducing-central-package-management/ --------- Co-authored-by: Valentin Breuß --- Directory.Packages.props | 42 +++++++++++++++++++ .../DependencyInjection.Tests.csproj | 2 +- Examples/Directory.Build.props | 24 +++++------ Examples/Examples.sln | 6 +++ Examples/ZipFile/ZipFile/ZipFile.csproj | 2 +- Source/Directory.Build.props | 4 +- ...Testably.Abstractions.AccessControl.csproj | 2 +- .../Testably.Abstractions.Compression.csproj | 2 +- .../Testably.Abstractions.Interface.csproj | 2 +- .../Testably.Abstractions.Testing.csproj | 4 +- Testably.Abstractions.sln | 1 + Tests/Directory.Build.props | 18 ++++---- ....Abstractions.Tests.SourceGenerator.csproj | 4 +- 13 files changed, 79 insertions(+), 34 deletions(-) create mode 100644 Directory.Packages.props diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 00000000..573910b1 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,42 @@ + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/Configuration/DependencyInjection.Tests/DependencyInjection.Tests.csproj b/Examples/Configuration/DependencyInjection.Tests/DependencyInjection.Tests.csproj index f2596a47..a904a4b5 100644 --- a/Examples/Configuration/DependencyInjection.Tests/DependencyInjection.Tests.csproj +++ b/Examples/Configuration/DependencyInjection.Tests/DependencyInjection.Tests.csproj @@ -5,7 +5,7 @@ - + diff --git a/Examples/Directory.Build.props b/Examples/Directory.Build.props index e370466a..f118e129 100644 --- a/Examples/Directory.Build.props +++ b/Examples/Directory.Build.props @@ -3,10 +3,6 @@ - - 2.* - - net7.0 latest @@ -28,22 +24,22 @@ ..\..\..\Build\Binaries\net7.0\Testably.Abstractions.Testing.dll - + - - + + - - - - - - - + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Examples/Examples.sln b/Examples/Examples.sln index df600281..f7192a74 100644 --- a/Examples/Examples.sln +++ b/Examples/Examples.sln @@ -4,6 +4,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{641A4EEA-484D-4332-B410-45DE0E95A4C6}" + ProjectSection(SolutionItems) = preProject + ..\Directory.Packages.props = ..\Directory.Packages.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{3D1F1BF2-0605-4EAA-AE14-7D06B02B9830}" ProjectSection(SolutionItems) = preProject Directory.Build.props = Directory.Build.props README.md = README.md @@ -139,6 +144,7 @@ Global {63F48EEB-F2A8-4A26-BEFF-A766EE2793DA} = {E116185F-52D4-48B4-BF55-D3BE0905805D} {C58E47F9-84D6-4D1C-8348-D72159597996} = {B19433E1-9187-4A98-A2F9-4A84366CD2DC} {BD564722-10AE-481F-B13C-A1C319731E7D} = {F05DF273-2CC0-4E23-81BF-AA48E8142144} + {3D1F1BF2-0605-4EAA-AE14-7D06B02B9830} = {641A4EEA-484D-4332-B410-45DE0E95A4C6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D439CFB9-E2DD-4DF9-AA90-F321B50EAD16} diff --git a/Examples/ZipFile/ZipFile/ZipFile.csproj b/Examples/ZipFile/ZipFile/ZipFile.csproj index d3a08aa2..c8bb1168 100644 --- a/Examples/ZipFile/ZipFile/ZipFile.csproj +++ b/Examples/ZipFile/ZipFile/ZipFile.csproj @@ -5,7 +5,7 @@ - + diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index 4f3f833b..2f631b3c 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -41,11 +41,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Source/Testably.Abstractions.AccessControl/Testably.Abstractions.AccessControl.csproj b/Source/Testably.Abstractions.AccessControl/Testably.Abstractions.AccessControl.csproj index fa1925d8..72082860 100644 --- a/Source/Testably.Abstractions.AccessControl/Testably.Abstractions.AccessControl.csproj +++ b/Source/Testably.Abstractions.AccessControl/Testably.Abstractions.AccessControl.csproj @@ -13,7 +13,7 @@ - + diff --git a/Source/Testably.Abstractions.Compression/Testably.Abstractions.Compression.csproj b/Source/Testably.Abstractions.Compression/Testably.Abstractions.Compression.csproj index b834ad91..6c3a31a5 100644 --- a/Source/Testably.Abstractions.Compression/Testably.Abstractions.Compression.csproj +++ b/Source/Testably.Abstractions.Compression/Testably.Abstractions.Compression.csproj @@ -13,7 +13,7 @@ - + diff --git a/Source/Testably.Abstractions.Interface/Testably.Abstractions.Interface.csproj b/Source/Testably.Abstractions.Interface/Testably.Abstractions.Interface.csproj index 47bd5c39..3e78c92e 100644 --- a/Source/Testably.Abstractions.Interface/Testably.Abstractions.Interface.csproj +++ b/Source/Testably.Abstractions.Interface/Testably.Abstractions.Interface.csproj @@ -18,7 +18,7 @@ - + diff --git a/Source/Testably.Abstractions.Testing/Testably.Abstractions.Testing.csproj b/Source/Testably.Abstractions.Testing/Testably.Abstractions.Testing.csproj index 84b73778..aa8035b7 100644 --- a/Source/Testably.Abstractions.Testing/Testably.Abstractions.Testing.csproj +++ b/Source/Testably.Abstractions.Testing/Testably.Abstractions.Testing.csproj @@ -24,8 +24,8 @@ - - + + diff --git a/Testably.Abstractions.sln b/Testably.Abstractions.sln index 8d08742f..b9909886 100644 --- a/Testably.Abstractions.sln +++ b/Testably.Abstractions.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{94F99274-3518-45 .gitignore = .gitignore CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md CONTRIBUTING.md = CONTRIBUTING.md + Directory.Packages.props = Directory.Packages.props Feature.Flags.props = Feature.Flags.props LICENSE = LICENSE nuget.config = nuget.config diff --git a/Tests/Directory.Build.props b/Tests/Directory.Build.props index 5710b6ab..d2549aa5 100644 --- a/Tests/Directory.Build.props +++ b/Tests/Directory.Build.props @@ -24,21 +24,21 @@ - - - - - - - + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Tests/Helpers/Testably.Abstractions.Tests.SourceGenerator/Testably.Abstractions.Tests.SourceGenerator.csproj b/Tests/Helpers/Testably.Abstractions.Tests.SourceGenerator/Testably.Abstractions.Tests.SourceGenerator.csproj index 9df5ab56..2501d15a 100644 --- a/Tests/Helpers/Testably.Abstractions.Tests.SourceGenerator/Testably.Abstractions.Tests.SourceGenerator.csproj +++ b/Tests/Helpers/Testably.Abstractions.Tests.SourceGenerator/Testably.Abstractions.Tests.SourceGenerator.csproj @@ -8,8 +8,8 @@ - - + +