From 9e395936dc03ff75d927674950aa80aebbd5abc8 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 24 Nov 2025 12:26:18 +0100 Subject: [PATCH] C#: Update extractor to target .NET 10. --- csharp/Directory.Build.props | 2 +- .../Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs | 2 +- .../Semmle.Extraction.CSharp.DependencyStubGenerator.csproj | 4 ++-- csharp/scripts/gen-assembly-info.py | 2 +- misc/bazel/csharp.bzl | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/csharp/Directory.Build.props b/csharp/Directory.Build.props index 0c8a2bc1526..8046ab10440 100644 --- a/csharp/Directory.Build.props +++ b/csharp/Directory.Build.props @@ -1,7 +1,7 @@ - net9.0 + net10.0 win-x64;linux-x64;osx-x64 enable true diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs index c60127c6835..9d3d79e4c4f 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs @@ -157,7 +157,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching } // The version number should be kept in sync with the version .NET version used for building the application. - public const string LatestDotNetSdkVersion = "9.0.300"; + public const string LatestDotNetSdkVersion = "10.0.100"; public static ReadOnlyDictionary MinimalEnvironment => IDotNetCliInvoker.MinimalEnvironment; diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj b/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj index 9ec28298950..2f05a1f9fe4 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 Semmle.Extraction.CSharp.DependencyStubGenerator Semmle.Extraction.CSharp.DependencyStubGenerator enable @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/csharp/scripts/gen-assembly-info.py b/csharp/scripts/gen-assembly-info.py index ca88f5e1683..9937477f70d 100644 --- a/csharp/scripts/gen-assembly-info.py +++ b/csharp/scripts/gen-assembly-info.py @@ -28,7 +28,7 @@ using System.Reflection; [assembly: AssemblyCompany("GitHub")] [assembly: AssemblyCopyright("Copyright © 2024 GitHub")] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v10.0", FrameworkDisplayName = ".NET 10.0")] """ output_file.write_text(output_file_contents) diff --git a/misc/bazel/csharp.bzl b/misc/bazel/csharp.bzl index 7a317909627..0cf2e30d0de 100644 --- a/misc/bazel/csharp.bzl +++ b/misc/bazel/csharp.bzl @@ -2,7 +2,7 @@ load("@rules_dotnet//dotnet:defs.bzl", "csharp_binary", "csharp_library", "cshar load("@rules_pkg//pkg:mappings.bzl", "strip_prefix") load("//misc/bazel:pkg.bzl", "codeql_pkg_files") -TARGET_FRAMEWORK = "net9.0" +TARGET_FRAMEWORK = "net10.0" def _gen_assembly_info(name): assembly_info_gen = name + "-assembly-info"