Skip to content

fix: .NET 10 CI build support via dotnet restore and global.json#97

Merged
gerhardol merged 15 commits into
feature/net10from
copilot/sub-pr-96
Mar 14, 2026
Merged

fix: .NET 10 CI build support via dotnet restore and global.json#97
gerhardol merged 15 commits into
feature/net10from
copilot/sub-pr-96

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 6, 2026

  • Replace nuget restore with dotnet restore in appveyor.yml
  • Add global.json to pin .NET 10 SDK version
  • Add .NET 10 SDK installation step to appveyor.yml (AppVeyor VS2022 image doesn't include .NET 10 SDK)
  • Use -JSonFile global.json in dotnet-install call instead of hardcoded -Channel 10.0
  • Persist PATH at Machine level so dotnet is available in subsequent steps
  • Move dotnet restore into install block (same PS session as SDK install) and add --nologo
  • Switch build: to build_script: using dotnet build --no-restore --nologo -bl:msbuild.binlog
  • Add *.binlog to AppVeyor artifacts so binlogs can be downloaded and analyzed
  • Use 2>&1 on all dotnet commands so stderr is merged into stdout — prevents PowerShell from creating error records from dotnet's informational stderr output
  • Add --verbosity quiet to both dotnet restore and dotnet build to suppress informational stderr output
  • Add 2>&1 to dotnet restore and dotnet publish in build_script (missing after base branch update)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copy link
Copy Markdown
Author

Copilot AI commented Mar 6, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.appveyor.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add GitExtensions 7 with .NET 10 and extensibility 1.0.0 fix: .NET 10 CI build support via dotnet restore and global.json Mar 6, 2026
Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
@gerhardol gerhardol force-pushed the copilot/sub-pr-96 branch from c999c3e to c9a11ad Compare March 6, 2026 22:12
@gerhardol
Copy link
Copy Markdown
Member

@copilot fix the build as .NET SDK 10 is not installed in AppVeyor builds

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 7, 2026

@copilot fix the build as .NET SDK 10 is not installed in AppVeyor builds

Fixed in 1f99150. Added an install section to appveyor.yml that downloads and runs the official dotnet-install.ps1 script to install the .NET 10 SDK channel before the build runs.

Comment thread appveyor.yml Outdated
…oding 10.0

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
@gerhardol
Copy link
Copy Markdown
Member

@copilot 'dotnet restore' fails in appveyor builds: Command executed with exception

…nd dotnet

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 8, 2026

@copilot 'dotnet restore' fails in appveyor builds: Command executed with exception

Fixed in 0746040. The root cause was that $env:PATH = ... in the install step only applies to that PowerShell session — the before_build step runs in a new process and didn't inherit it. Added [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Machine) to persist the dotnet PATH at machine level, so it's available to all subsequent steps.

@gerhardol
Copy link
Copy Markdown
Member

@copilot still fails.
--nologo should be added to all dotnet commands, is it causing the crash here?

… PATH issues

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 8, 2026

@copilot still fails.
--nologo should be added to all dotnet commands, is it causing the crash here?

Fixed in 8fc3116. Added --nologo and also moved dotnet restore into the install block so it runs in the same PowerShell session where the .NET 10 SDK PATH is already set — this eliminates the cross-step PATH propagation issue that was causing the exception in before_build.

@gerhardol
Copy link
Copy Markdown
Member

@copilot build still fails in the same way as before, no info about the exception
also dedirect to binlog

… from dotnet stderr output

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 8, 2026

@copilot Still fails in appveyor
As dotnet still reports the exception, is it due to the verbosity is set to normal?

...

Fixed in 1fff484. The NativeCommandError was caused by AppVeyor running PowerShell with $ErrorActionPreference = 'Stop' — any stderr output from dotnet (even informational) gets treated as a fatal exception. Added $ErrorActionPreference = 'Continue' at the top of both the install and build_script blocks, with explicit $LASTEXITCODE checks to still fail on actual errors.

@gerhardol
Copy link
Copy Markdown
Member

…ll NativeCommandError

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 8, 2026

@copilot still fails
https://ci.appveyor.com/project/gitextensions/gitextensions-gerritplugin/builds/53663297

Fixed in ed8ab65. $ErrorActionPreference = 'Continue' wasn't sufficient because AppVeyor monitors the PowerShell error stream and fails the build if it contains any error records — even non-terminating ones. Using 2>&1 on all dotnet commands merges stderr directly into stdout, so no error records are ever created. The $LASTEXITCODE checks still catch actual failures.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ci.appveyor.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@gerhardol
Copy link
Copy Markdown
Member

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 8, 2026

@copilot use quiet instead
fail in https://ci.appveyor.com/project/gitextensions/gitextensions-gerritplugin/builds/53663311

Done in 17d1671. Added --verbosity quiet to both dotnet restore and dotnet build.

@gerhardol gerhardol force-pushed the copilot/sub-pr-96 branch 2 times, most recently from fa7dd4f to 5296a20 Compare March 11, 2026 22:22
@gerhardol
Copy link
Copy Markdown
Member

@copilot dotnet restore fails in Appveyor
Command executed with exception: --------------------------------------------------------------------------------------

… NativeCommandError

Co-authored-by: gerhardol <6248932+gerhardol@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 11, 2026

@copilot dotnet restore fails in Appveyor
Command executed with exception: --------------------------------------------------------------------------------------

Fixed in 148e552. The base branch update introduced dotnet restore and dotnet publish commands without 2>&1, causing PowerShell to create error records from dotnet's informational stderr output. Added 2>&1 to both commands to merge stderr into stdout.

Comment thread appveyor.yml Outdated

build_script:
- ps: |
$env:PATH = "$env:LOCALAPPDATA\Microsoft\dotnet;$env:PATH"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All of it looks excessively complex. We should be able to run the same as we do in the main pipeline.
I'll see if I can carve some time over the weekend, if it's not resolved before then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I aligned with the main app, merging this to my PR and we refine from there

@gerhardol gerhardol marked this pull request as ready for review March 12, 2026 23:18
@gerhardol gerhardol merged commit f4ef7d6 into feature/net10 Mar 14, 2026
3 checks passed
@gerhardol gerhardol deleted the copilot/sub-pr-96 branch March 14, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants