From 16b93ee23574243b5c32859c722505632afec7c7 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 22 Feb 2025 14:16:35 +0100 Subject: [PATCH] refactor: consolidate project settings in `Directory.Build.props` Move common settings to the `Directory.Build.props` file. --- Directory.Build.props | 2 +- System.IO.Abstractions.sln | 6 +++ src/Directory.Build.props | 38 +++++++++++++++---- ...stem.IO.Abstractions.TestingHelpers.csproj | 18 +++------ ...eIO.System.IO.Abstractions.Wrappers.csproj | 30 +++++++-------- 5 files changed, 56 insertions(+), 38 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 99b60410d..fc1080101 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ System.IO.Abstractions - Copyright © Tatham Oddie & friends 2010-2024 + Copyright © Tatham Oddie & friends 2010-$([System.DateTime]::Now.ToString('yyyy')) Tatham Oddie & friends True $(MSBuildThisFileDirectory)StrongName.snk diff --git a/System.IO.Abstractions.sln b/System.IO.Abstractions.sln index 3ec9ec636..e94f26780 100644 --- a/System.IO.Abstractions.sln +++ b/System.IO.Abstractions.sln @@ -40,6 +40,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ .github\workflows\pr.yml = .github\workflows\pr.yml EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B66A0B3F-6A00-482E-99E2-27D8DECB075E}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +96,7 @@ Global {2BE9161B-A3F3-4511-81DB-DB1DCB6375C9} = {BBF7AD8D-5522-48C0-A906-00CBB72308A0} {D905E09D-6DC3-4F7C-8E83-82FADAE2C9E5} = {2BE9161B-A3F3-4511-81DB-DB1DCB6375C9} {1B8388D2-58A7-47B8-89EC-C5A94A0FEED5} = {C078E0B6-9747-475F-A999-B9E775DF6643} + {B66A0B3F-6A00-482E-99E2-27D8DECB075E} = {BBF7AD8D-5522-48C0-A906-00CBB72308A0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {8885C59C-F6A0-4C2F-A3BC-B720E9BD161F} diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d4025be1c..f6ad89407 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,10 +1,32 @@ - - - true - true - snupkg - true - true - + + + + + net472;netstandard2.0;netstandard2.1;net6.0;net8.0;net9.0 + + + + true + true + snupkg + true + true + + + + icon_256x256.png + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + 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 ffd7791a7..439bdd6f8 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 @@ -1,22 +1,14 @@  + TestableIO.System.IO.Abstractions.TestingHelpers System.IO.Abstractions.TestingHelpers A set of pre-built mocks to help when testing file system interactions. - net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472 - icon_256x256.png + - - - - - - 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 fabcbc8d6..6a4cb72e5 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 @@ -1,18 +1,16 @@ - - TestableIO.System.IO.Abstractions.Wrappers - System.IO.Abstractions - A set of abstractions to help make file system interactions testable. - net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472 - icon_256x256.png - - - - - - - - - - + + + TestableIO.System.IO.Abstractions.Wrappers + System.IO.Abstractions + A set of abstractions to help make file system interactions testable. + + + + + + + + + \ No newline at end of file