Skip to content

Commit 25fb4f4

Browse files
michaelnebelCopilot
andcommitted
C#: Disable the .NET CLI MSBuild server during tracing
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 2900a5d commit 25fb4f4

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎csharp/codeql-extractor.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ column_kind: "utf16"
77
overlay_support_version: 20250626
88
extra_env_vars:
99
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
10-
# Reused MSBuild nodes may have been started outside the traced build.
11-
MSBUILDDISABLENODEREUSE: "1"
10+
# The MSBuild server may have been started outside the traced build.
11+
DOTNET_CLI_USE_MSBUILD_SERVER: "false"
1212
build_modes:
1313
- autobuild
1414
- manual

‎csharp/ql/integration-tests/all-platforms/dotnet_build/dotnet_build.csproj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

10-
<Target Name="CheckNodeReuse">
11-
<Error Condition="'$(MSBUILDDISABLENODEREUSE)' != '1'"
12-
Text="Expected MSBuild node reuse to be disabled during CodeQL tracing." />
10+
<Target Name="CheckMSBuildServer">
11+
<Error Condition="'$(DOTNET_CLI_USE_MSBUILD_SERVER)' != 'false'"
12+
Text="Expected the .NET CLI MSBuild server to be disabled during CodeQL tracing." />
1313
</Target>
1414

1515
</Project>

‎csharp/ql/integration-tests/all-platforms/dotnet_build/test.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def check_build_out(msg, s):
77
), f"The C# tracer did not interpret the dotnet path-to-application command correctly."
88

99
def test1(codeql, csharp):
10-
codeql.database.create(command="dotnet build -t:Build,CheckNodeReuse")
10+
codeql.database.create(command="dotnet build -t:Build,CheckMSBuildServer")
1111

1212

1313
# This test checks that we don't inject any flags when running the application using `dotnet`

0 commit comments

Comments
 (0)