Skip to content

Commit

Permalink
feat!: increase minimal framework version from 4.6.2 to 4.7.2 (#1210)
Browse files Browse the repository at this point in the history
Preparation for migrating to xunit, as the runner there also requires minimum framework version 4.7.2
  • Loading branch information
vbreuss authored Feb 22, 2025
1 parent fccf667 commit 9371d4b
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageProjectUrl>https://github.com/TestableIO/System.IO.Abstractions</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<DefineConstants Condition="'$(TargetFramework)' != 'net462'">$(DefineConstants);FEATURE_FILE_SYSTEM_ACL_EXTENSIONS</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)' != 'net472'">$(DefineConstants);FEATURE_FILE_SYSTEM_ACL_EXTENSIONS</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)' == 'net9.0' OR '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'netstandard2.1'">$(DefineConstants);FEATURE_ASYNC_FILE;FEATURE_ENUMERATION_OPTIONS;FEATURE_ADVANCED_PATH_OPERATIONS;FEATURE_PATH_JOIN_WITH_SPAN;FEATURE_SPAN</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)' == 'net9.0' OR '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net6.0'">$(DefineConstants);FEATURE_FILE_MOVE_WITH_OVERWRITE;FEATURE_SUPPORTED_OS_ATTRIBUTE;FEATURE_FILE_SYSTEM_WATCHER_FILTERS;FEATURE_ENDS_IN_DIRECTORY_SEPARATOR;FEATURE_PATH_JOIN_WITH_PARAMS;FEATURE_PATH_JOIN_WITH_FOUR_PATHS;FEATURE_FILE_SYSTEM_INFO_LINK_TARGET;FEATURE_CREATE_SYMBOLIC_LINK;FEATURE_FILESTREAM_OPTIONS</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)' == 'net9.0' OR '$(TargetFramework)' == 'net8.0'">$(DefineConstants);FEATURE_PATH_EXISTS;FEATURE_FILE_SYSTEM_WATCHER_WAIT_WITH_TIMESPAN;FEATURE_FILE_ATTRIBUTES_VIA_HANDLE;FEATURE_CREATE_TEMP_SUBDIRECTORY;FEATURE_READ_LINES_ASYNC;FEATURE_UNIX_FILE_MODE</DefineConstants>
Expand Down
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies.net462" Version="1.0.3" />
<PackageVersion Include="IsExternalInit" Version="1.0.3" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="Testably.Abstractions.FileSystem.Interface" Version="9.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AssemblyName>System.IO.Abstractions.TestingHelpers</AssemblyName>
<RootNamespace>System.IO.Abstractions.TestingHelpers</RootNamespace>
<Description>A set of pre-built mocks to help when testing file system interactions.</Description>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472</TargetFrameworks>
<PackageIcon>icon_256x256.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/System.IO.Abstractions/System.IO.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AssemblyName>System.IO.Abstractions</AssemblyName>
<RootNamespace>System.IO.Abstractions</RootNamespace>
<Description>A set of abstractions to help make file system interactions testable.</Description>
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net472</TargetFrameworks>
<PackageIcon>icon_256x256.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
<AssemblyName>TestableIO.System.IO.Abstractions.TestingHelpers</AssemblyName>
<RootNamespace>System.IO.Abstractions.TestingHelpers</RootNamespace>
<Description>A set of pre-built mocks to help when testing file system interactions.</Description>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472</TargetFrameworks>
<PackageIcon>icon_256x256.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Testably.Abstractions.FileSystem.Interface" />
<ProjectReference Include="../TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net462">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="IsExternalInit">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
<AssemblyName>TestableIO.System.IO.Abstractions.Wrappers</AssemblyName>
<RootNamespace>System.IO.Abstractions</RootNamespace>
<Description>A set of abstractions to help make file system interactions testable.</Description>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472</TargetFrameworks>
<PackageIcon>icon_256x256.png</PackageIcon>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.IO.FileSystem.AccessControl" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net462">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="..\..\images\icon_256x256.png" Pack="true" PackagePath="\" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
<AssemblyName>TestableIO.System.IO.Abstractions</AssemblyName>
<RootNamespace>System.IO.Abstractions</RootNamespace>
<Description>A set of abstractions to help make file system interactions testable.</Description>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472</TargetFrameworks>
<PackageIcon>icon_256x256.png</PackageIcon>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net462">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Nullable">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net462</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net472</TargetFrameworks>
<Description>The unit tests for our pre-built mocks</Description>
<AssemblyName>System.IO.Abstractions.TestingHelpers.Tests</AssemblyName>
<RootNamespace>System.IO.Abstractions.TestingHelpers.Tests</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public ApiDiff(IEnumerable<string> extraMembers, IEnumerable<string> missingMemb
public string[] MissingMembers { get; }
}

#if NET462
private const string snapshotSuffix = ".NET Framework 4.6.2";
#if NET472
private const string snapshotSuffix = ".NET Framework 4.7.2";
#elif NET6_0
private const string snapshotSuffix = ".NET 6.0";
#elif NET8_0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net462</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net472</TargetFrameworks>
<Description>The unit tests for our the core abstractions</Description>
<AssemblyName>System.IO.Abstractions.Tests</AssemblyName>
<RootNamespace>System.IO.Abstractions.Tests</RootNamespace>
Expand Down

0 comments on commit 9371d4b

Please sign in to comment.