Repository navigation
C#: Use .NET 11 to build the extractor. - #23161
Conversation
340c319 to
e17bcaa
Compare
7110c7e to
882b835
Compare
…que .NET version is detected.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
882b835 to
34c9ac7
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The .NET 11 migration leaves stub generation pinned to an incompatible .NET 10 SDK and debugger launch paths pointing to net10.0 outputs, breaking stub workflows and launching missing or stale binaries.
2 open issues
What changed in this PR
Migrates the C# extractor build and target framework to .NET 11, including packaging, CI, and the default SDK used for build-mode-none analysis.
Changes:
- Aligns SDK, runtime, and target-framework settings with .NET 11.
- Updates
rules_dotnetand Paket integration to consume the lockfile directly, removing generated Bazel dependency definitions. - Updates test expectations and adds a change note for the new default SDK.
| File | Description |
|---|---|
MODULE.bazel |
Pins updated rules_dotnet, selects .NET 11, and enables direct Paket parsing. |
misc/bazel/registry/modules/rules_dotnet/metadata.json |
Removes obsolete local registry metadata. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/source.json |
Removes the previous release source configuration. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/patches/revert_additional_files_in_nuget_archive.patch |
Removes the old NuGet archive patch. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/patches/module_dot_bazel_version.patch |
Removes the obsolete module-version patch. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/MODULE.bazel |
Removes the previous registry module definition. |
misc/bazel/patches/rules_dotnet_nuget_archive.patch |
Adds the adapted NuGet archive filtering patch. |
misc/bazel/patches/BUILD.bazel |
Exports the replacement patch. |
misc/bazel/csharp.bzl |
Targets .NET 11 in Bazel builds. |
csharp/update-deps.sh |
Removes the obsolete paket2bazel generation step. |
csharp/scripts/gen-assembly-info.py |
Emits .NET 11 target-framework metadata. |
csharp/scripts/create-extractor-pack.sh |
Publishes with runtime version 11.0.0. |
csharp/ql/test/utils/modeleditor/ApplicationModeEndpoints.expected |
Updates expected assembly versions. |
csharp/ql/test/library-tests/dispatch/viableCallable.expected |
Adds expected decimal-type operator candidates. |
csharp/ql/test/library-tests/conversion/operator/Operator.expected |
Adds expected numeric conversions. |
csharp/ql/test/library-tests/assemblies/compilation.expected |
Updates expected framework assembly versions. |
csharp/ql/lib/change-notes/2026-11-19-bmn-net11.md |
Documents the build-mode-none default SDK change. |
csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected |
Updates expected bundled assemblies. |
csharp/paket.main.bzl |
Removes generated NuGet repository definitions. |
csharp/paket.main_extension.bzl |
Removes the generated Paket module extension. |
csharp/paket.lock |
Updates framework restriction and dependency edges. |
csharp/paket.dependencies |
Restricts dependencies to .NET 11. |
csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj |
Retargets the stub generator to .NET 11. |
csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs |
Sets the default SDK to 11.0.100. |
csharp/Directory.Build.props |
Sets the shared target framework to .NET 11. |
csharp/BUILD.bazel |
Exports Paket inputs for direct parsing. |
csharp/actions/create-extractor-pack/action.yml |
Installs SDK 11.0.100 for packaging. |
csharp/.paket/Paket.Restore.targets |
Updates Paket discovery, restore caching, and packing integration. |
csharp/.config/dotnet-tools.json |
Upgrades Paket to 12.0.0. |
.github/workflows/csharp-qltest.yml |
Updates CI SDK and test runtime versions. |
.github/workflows/codeql-analysis.yml |
Selects SDK 11.0.100 for analysis. |
.gitattributes |
Removes entries for deleted generated Bazel files. |
Review effort: Balanced (adaptive)
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <TargetFramework>net11.0</TargetFramework> |
There was a problem hiding this comment.
I am doing a follow up PR for updating the stub generator script and all the tests to target .NET 11: #23172
There was a problem hiding this comment.
Ah, I had forgotten that this is workflow that we run as a part of the CI - yes, we need to update immediately.
Doing it here.
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <TargetFramework>net11.0</TargetFramework> |
There was a problem hiding this comment.
Fair point, I will add that on the follow up PR as well.


Updating the build to use .NET 11 to build the extractor and also set the target framework for the extractor to .NET 11.
Notes.
rules_dotnetwhich removes the requirement that only a hardcoded list of .NET versions are supported.rules_dotnetremoved@rules_dotnet//tools/paket2bazeland instead reads thepaket.lockfile directly. CoPilot provided the update to the build and update theupdate_deps.shscript.