Skip to content

Conversation

@michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Nov 14, 2025

In this PR we

  • Add logic for downloading ARM specific version of .NET (if installing/downloading on an Mac ARM marchine)
  • Ensure that the minimal set of dotnet environment variables are set when executing dotnet commands.
  • Add basic .NET 10 tests (to ensure that we don't crash when extracting using .NET 10).

The changes to the .NET download and environment variable setting was made because the .NET 10 tests failed spuriously.

Added some .NET 10 integration tests for traced and buildless (replacing the .NET 10 RC 2 integration tests we ran on Windows and Linux). We do not officially support .NET 10.

@github-actions github-actions bot added the C# label Nov 14, 2025
@michaelnebel michaelnebel marked this pull request as ready for review November 14, 2025 11:36
@michaelnebel michaelnebel requested a review from a team as a code owner November 14, 2025 11:36
Copilot AI review requested due to automatic review settings November 14, 2025 11:36
Copilot finished reviewing on behalf of michaelnebel November 14, 2025 11:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the .NET 10 RC 2 integration tests with .NET 10 final release integration tests. The platform-specific tests (Windows and Linux) are removed in favor of a single all-platforms test that covers both traced and buildless build modes.

  • Removes .NET 10 RC 2 tests from windows/dotnet_10_rc2 and linux/dotnet_10_rc2 directories
  • Adds new .NET 10 final release tests in all-platforms/dotnet_10 directory
  • Tests both traced mode (test1) and buildless mode (test2)

Reviewed Changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
csharp/ql/integration-tests/windows/dotnet_10_rc2/test.py Removed RC 2 test file for Windows
csharp/ql/integration-tests/windows/dotnet_10_rc2/global.json Removed RC 2 SDK configuration for Windows
csharp/ql/integration-tests/windows/dotnet_10_rc2/dotnet_build.csproj Removed RC 2 project file for Windows
csharp/ql/integration-tests/windows/dotnet_10_rc2/Program.cs Removed RC 2 test program for Windows
csharp/ql/integration-tests/linux/dotnet_10_rc2/test.py Removed RC 2 test file for Linux
csharp/ql/integration-tests/linux/dotnet_10_rc2/global.json Removed RC 2 SDK configuration for Linux
csharp/ql/integration-tests/all-platforms/dotnet_10/test.py Added new test with traced and buildless modes for .NET 10 final release
csharp/ql/integration-tests/all-platforms/dotnet_10/global.json Added SDK configuration for .NET 10.0.100 final release
csharp/ql/integration-tests/all-platforms/dotnet_10/dotnet_build.csproj Added .NET 10 project file with net10.0 target framework
csharp/ql/integration-tests/all-platforms/dotnet_10/Program.cs Added simple test program that outputs command-line arguments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

hvitved
hvitved previously approved these changes Nov 17, 2025
@michaelnebel michaelnebel changed the title C#: Initial .NET 10 integration tests. C#: Improve the logic for downloading .NET and setting environment variables. Nov 19, 2025
@michaelnebel michaelnebel requested a review from hvitved November 19, 2025 10:55
@michaelnebel
Copy link
Contributor Author

@hvitved : The PR is ready for review again. The scope has been changed to also improve the .NET downloading and environment variable setting. The tests has run successfully four times in a row - so I hope this fixes the .NET 10 crash problem on MacOS. Will also start some DCA experiments.

Comment on lines +283 to +288
// Request ARM64 architecture on Apple Silicon machines
if (actions.IsRunningOnAppleSilicon())
{
cb.Argument("--architecture").
Argument("arm64");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by comment: does this not cause problems for the tracer? I assume some test would have caught it if it was a problem, but I am curious about why this is OK. Would it maybe make sense to document that in a comment here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the ARM machines (when inspecting the output from the other tests) it looks like the RiD is osx-arm64 for the installed .NET versions (at least those being used). Without setting this explicitly, the install script downloads the osx-x64 version. According to CoPilot it can cause problems when different versions of .NET are installed on the same machine. Changing this appears to have a positive effect when running the (traced .NET 10) tests on the MacOS 15 and MacOS26 runners.

Comment on lines +20 to +22
{"DOTNET_CLI_UI_LANGUAGE", "en"},
{"MSBUILDDISABLENODEREUSE", "1"},
{"DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "true"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: The doc comment above explains DOTNET_CLI_UI_LANGUAGE but not the other two environment variables. Would it make sense to document why we are setting them as well? DOTNET_SKIP_FIRST_TIME_EXPERIENCE is kind of obvious, but MSBUILDDISABLENODEREUSE maybe less so.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no comment explaining this before and I just moved the logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add some comments - then the tests will also be run a again 😄

@michaelnebel
Copy link
Contributor Author

DCA looks good.

Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelnebel michaelnebel merged commit 60826bd into github:main Nov 21, 2025
24 checks passed
@michaelnebel michaelnebel deleted the csharp/dotnet10 branch November 21, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants