Skip to content

Commit 93869d4

Browse files
BREAKING: drops net6.0 support. adds net9.0 support. updates packages (#109)
Drops net6.0 support EOL November 2024 and adds support for net9.0 --------- Co-authored-by: Leonardo Chaia <[email protected]>
1 parent 60dd23b commit 93869d4

File tree

9 files changed

+29
-24
lines changed

9 files changed

+29
-24
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ jobs:
5959
- name: Run Tool PowerShell
6060
if: matrix.os == 'windows-latest'
6161
shell: pwsh
62-
run: ./src/dotnet-affected/bin/Debug/net6.0/dotnet-affected -p $Env:GITHUB_WORKSPACE --assume-changes dotnet-affected -v
62+
run: ./src/dotnet-affected/bin/Debug/net9.0/dotnet-affected -p $Env:GITHUB_WORKSPACE --assume-changes dotnet-affected -v
6363

6464
- name: Run Tool Bash
6565
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
6666
shell: bash
67-
run: ./src/dotnet-affected/bin/Debug/net6.0/dotnet-affected -p $GITHUB_WORKSPACE --assume-changes dotnet-affected -v
67+
run: ./src/dotnet-affected/bin/Debug/net9.0/dotnet-affected -p $GITHUB_WORKSPACE --assume-changes dotnet-affected -v
6868

6969
- name: Pack
7070
if: success() && matrix.os == 'ubuntu-latest'
@@ -82,4 +82,4 @@ jobs:
8282
if: success() && matrix.os == 'ubuntu-latest'
8383
with:
8484
name: artifacts
85-
path: src/dotnet-affected/bin/Debug/net8.0/
85+
path: src/dotnet-affected/bin/Debug/net9.0/

Directory.Build.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
44

55
<LangVersion>9.0</LangVersion>
66

77
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
88

99
<!-- https://github.com/NuGet/Home/wiki/Centrally-managing-NuGet-package-versions -->
1010
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
11+
12+
<NuGetAudit>true</NuGetAudit>
13+
<NuGetAuditMode>direct</NuGetAuditMode>
1114
</PropertyGroup>
1215

1316
<!-- Some general configuration applied to all projects -->

Directory.Packages.props

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@
88
<PackageVersion Include="Microsoft.Build.Prediction" Version="1.2.18" />
99
<PackageVersion Include="Microsoft.Build.Locator" Version="1.7.8" />
1010

11-
<PackageVersion Include="BenchmarkDotNet" Version="0.13.5" />
11+
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
1212
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" Condition="'$(OS)' == 'Windows_NT'"/>
1313

1414
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" Condition="'$(ContinuousIntegrationBuild)' == 'true'"/>
1515
</ItemGroup>
1616

17-
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
18-
<PackageVersion Include="Microsoft.Build" Version="17.3.2" />
19-
<PackageVersion Include="Microsoft.Build.Framework" Version="17.3.2" />
20-
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.3.2" />
21-
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
22-
<PackageVersion Include="System.CodeDom" Version="6.0.0" />
23-
</ItemGroup>
24-
2517
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2618
<PackageVersion Include="Microsoft.Build" Version="17.11.4" />
2719
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.4" />
2820
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.11.4" />
29-
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
21+
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
3022
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
3123
</ItemGroup>
3224

25+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
26+
<PackageVersion Include="Microsoft.Build" Version="17.12.6" />
27+
<PackageVersion Include="Microsoft.Build.Framework" Version="17.12.6" />
28+
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.12.6" />
29+
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
30+
<PackageVersion Include="System.CodeDom" Version="9.0.0" />
31+
</ItemGroup>
32+
3333
</Project>

eng/install-sdk.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ $globalJsonFile = "$PSScriptRoot\..\global.json"
1010
$dotnetInstallDir = "$PSScriptRoot\.dotnet"
1111

1212
. $installScript -InstallDir $dotnetInstallDir -JSonFile $globalJsonFile
13-
. $installScript -InstallDir $dotnetInstallDir -Channel 6.0
13+
. $installScript -InstallDir $dotnetInstallDir -Channel 8.0

eng/install-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ global_json_file="$(dirname "$0")/../global.json"
1414
dotnet_install_dir="$(dirname "$0")/.dotnet"
1515

1616
"$install_script" --install-dir "$dotnet_install_dir" --jsonfile "$global_json_file"
17-
"$install_script" --install-dir "$dotnet_install_dir" --channel 6.0
17+
"$install_script" --install-dir "$dotnet_install_dir" --channel 8.0

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.401",
3+
"version": "9.0.101",
44
"allowPrerelease": true
55
}
66
}

src/dotnet-affected/Infrastructure/Formatters/TraversalProjectOutputFormatter.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ public Task<string> Format(IEnumerable<IProjectInfo> projects)
1919
var stringReader = new StringReader(projectRootElement);
2020
var xmlReader = new XmlTextReader(stringReader);
2121
var root = ProjectRootElement.Create(xmlReader);
22-
23-
var project = new Project(root);
22+
23+
// REMARKS: IgnoreMissingImports is required due to the Microsoft.Build.Traversal Sdk not being found
24+
// on macos/darwin. We don't really need to evaluate the project, we just need to build the RawXml.
25+
var project = new Project(root, null, null, ProjectCollection.GlobalProjectCollection, ProjectLoadSettings.IgnoreMissingImports);
2426

2527
// Find all affected and add them as project references
2628
foreach (var projectInfo in projects)

test/Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project>
22
<Import Project="../Directory.Packages.props" />
33
<ItemGroup>
4-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
4+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0"/>
55
<PackageVersion Include="Moq" Version="4.20.72" />
66
<PackageVersion Include="xunit" Version="2.9.2" />
7-
<PackageVersion Include="xunit.core" Version="2.4.1" />
7+
<PackageVersion Include="xunit.core" Version="2.9.2" />
88
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
9-
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0-pre.35"/>
9+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0-pre.49"/>
1010
<PackageVersion Include="coverlet.collector" Version="6.0.2"/>
11-
<PackageVersion Include="XunitXml.TestLogger" Version="4.0.254" />
11+
<PackageVersion Include="XunitXml.TestLogger" Version="4.1.0" />
1212
</ItemGroup>
1313
</Project>

test/DotnetAffected.Testing.Utils/Repository/TemporaryRepositoryExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static ProjectRootElement CreateMsBuildProject(
5151
// Directory.Build.Props / Directory.Packages.props
5252
project.Sdk = "Microsoft.NET.Sdk";
5353
// Required for net8.0 MSBuild Project Creation
54-
project.AddProperty("TargetFrameworks", "net6.0,net8.0");
54+
project.AddProperty("TargetFrameworks", "net8.0;net9.0");
5555
customizer?.Invoke(project);
5656

5757
project.Save();

0 commit comments

Comments
 (0)