From 58a4b48a7ceb04a5a0520df25cfa4a31371eef83 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 03:47:31 +0000 Subject: [PATCH 1/6] Initial plan From 6d6fd1063031e5a615ab89a371d8b376cce78803 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 03:49:46 +0000 Subject: [PATCH 2/6] Remove --trust flag from dotnet dev-certs https command on Ubuntu The --trust flag causes failures on GitHub Actions ubuntu-latest runners with .NET SDK 10.0.103+ due to a bug in ASP.NET Core. Since the trust functionality doesn't work properly on Linux anyway, we remove the flag. Fixes: https://github.com/dotnet/aspnetcore/issues/65391 Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- .devcontainer/post-create.sh | 2 +- .github/actions/setup-runtimes-caching/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index b880b6188..0e5f2b558 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -5,7 +5,7 @@ sudo apt-get update && \ sudo rm -rf /var/lib/apt/lists/* echo Install .NET dev certs -dotnet dev-certs https --trust +dotnet dev-certs https echo Install Aspire curl -sSL https://aspire.dev/install.sh | bash diff --git a/.github/actions/setup-runtimes-caching/action.yml b/.github/actions/setup-runtimes-caching/action.yml index 27c4edbf9..8aa3714ef 100644 --- a/.github/actions/setup-runtimes-caching/action.yml +++ b/.github/actions/setup-runtimes-caching/action.yml @@ -85,7 +85,7 @@ runs: shell: bash if: ${{ matrix.os == 'ubuntu-latest' }} run: | - dotnet dev-certs https --trust + dotnet dev-certs https - name: Setup Node globals shell: bash From 02719395e4d3be4453495e6344cd10b32aae1bb2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 04:04:03 +0000 Subject: [PATCH 3/6] Fix dev-certs issue by setting WSL_INTEROP="" env var The correct fix for the dotnet dev-certs https --trust issue on Ubuntu is to set the WSL_INTEROP environment variable to an empty string, which prevents the WSL interop layer from interfering with the command. This reverts the previous approach of removing --trust and implements the recommended workaround from: https://github.com/dotnet/aspnetcore/issues/65391#issuecomment-3881681840 Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- .devcontainer/post-create.sh | 2 +- .github/actions/setup-runtimes-caching/action.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 0e5f2b558..b880b6188 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -5,7 +5,7 @@ sudo apt-get update && \ sudo rm -rf /var/lib/apt/lists/* echo Install .NET dev certs -dotnet dev-certs https +dotnet dev-certs https --trust echo Install Aspire curl -sSL https://aspire.dev/install.sh | bash diff --git a/.github/actions/setup-runtimes-caching/action.yml b/.github/actions/setup-runtimes-caching/action.yml index 8aa3714ef..e83f6d173 100644 --- a/.github/actions/setup-runtimes-caching/action.yml +++ b/.github/actions/setup-runtimes-caching/action.yml @@ -84,8 +84,10 @@ runs: - name: Setup .NET dev certs shell: bash if: ${{ matrix.os == 'ubuntu-latest' }} + env: + WSL_INTEROP: "" run: | - dotnet dev-certs https + dotnet dev-certs https --trust - name: Setup Node globals shell: bash From 4a6c339d0c8c5ff946db0cefc87615c72e6b93bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 04:04:36 +0000 Subject: [PATCH 4/6] Apply WSL_INTEROP workaround to devcontainer setup as well The same fix is needed in the devcontainer post-create script to prevent the same issue from occurring when setting up development environments. Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- .devcontainer/post-create.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index b880b6188..08b1b5eba 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -5,6 +5,7 @@ sudo apt-get update && \ sudo rm -rf /var/lib/apt/lists/* echo Install .NET dev certs +export WSL_INTEROP="" dotnet dev-certs https --trust echo Install Aspire From d17e12aaeaf02c5d076582800b053afa1a659e44 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 04:10:46 +0000 Subject: [PATCH 5/6] Use exit code checking workaround for dev-certs command The WSL_INTEROP workaround didn't work. Instead, use the recommended approach of checking exit codes. Exit code 4 indicates partial trust (which is acceptable), while other non-zero exit codes indicate failure. This allows the certificate setup to succeed when it's partially trusted but still fail on actual errors. Based on: https://github.com/dotnet/aspnetcore/issues/65391#issuecomment-3885917253 Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- .devcontainer/post-create.sh | 8 ++++++-- .github/actions/setup-runtimes-caching/action.yml | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 08b1b5eba..879380fa7 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -5,8 +5,12 @@ sudo apt-get update && \ sudo rm -rf /var/lib/apt/lists/* echo Install .NET dev certs -export WSL_INTEROP="" -dotnet dev-certs https --trust +EXIT_CODE=0 +dotnet dev-certs https --trust || EXIT_CODE=$? +if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 4 ]; then + echo "dotnet dev-certs https --trust failed with exit code $EXIT_CODE" + exit $EXIT_CODE +fi echo Install Aspire curl -sSL https://aspire.dev/install.sh | bash diff --git a/.github/actions/setup-runtimes-caching/action.yml b/.github/actions/setup-runtimes-caching/action.yml index e83f6d173..7194dd107 100644 --- a/.github/actions/setup-runtimes-caching/action.yml +++ b/.github/actions/setup-runtimes-caching/action.yml @@ -84,10 +84,13 @@ runs: - name: Setup .NET dev certs shell: bash if: ${{ matrix.os == 'ubuntu-latest' }} - env: - WSL_INTEROP: "" run: | - dotnet dev-certs https --trust + EXIT_CODE=0 + dotnet dev-certs https --trust || EXIT_CODE=$? + if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 4 ]; then + echo "dotnet dev-certs https --trust failed with exit code $EXIT_CODE" + exit $EXIT_CODE + fi - name: Setup Node globals shell: bash From 3e6b0e8b26fa6e723b374935f76faecaa022ae3d Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Tue, 17 Feb 2026 15:57:59 +1100 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .devcontainer/post-create.sh | 5 +++-- .github/actions/setup-runtimes-caching/action.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 879380fa7..2b877eef1 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -6,10 +6,11 @@ sudo apt-get update && \ echo Install .NET dev certs EXIT_CODE=0 +PARTIAL_TRUST_EXIT_CODE=4 # Exit code 4 indicates "partial trust" per aspnetcore#65391. dotnet dev-certs https --trust || EXIT_CODE=$? -if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 4 ]; then +if [ "$EXIT_CODE" -ne 0 ] && [ "$EXIT_CODE" -ne "$PARTIAL_TRUST_EXIT_CODE" ]; then echo "dotnet dev-certs https --trust failed with exit code $EXIT_CODE" - exit $EXIT_CODE + exit "$EXIT_CODE" fi echo Install Aspire diff --git a/.github/actions/setup-runtimes-caching/action.yml b/.github/actions/setup-runtimes-caching/action.yml index 7194dd107..73349b920 100644 --- a/.github/actions/setup-runtimes-caching/action.yml +++ b/.github/actions/setup-runtimes-caching/action.yml @@ -87,9 +87,10 @@ runs: run: | EXIT_CODE=0 dotnet dev-certs https --trust || EXIT_CODE=$? - if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 4 ]; then + PARTIAL_TRUST_EXIT_CODE=4 # See aspnetcore#65391: exit code 4 indicates partial trust + if [ "$EXIT_CODE" -ne 0 ] && [ "$EXIT_CODE" -ne "$PARTIAL_TRUST_EXIT_CODE" ]; then echo "dotnet dev-certs https --trust failed with exit code $EXIT_CODE" - exit $EXIT_CODE + exit "$EXIT_CODE" fi - name: Setup Node globals