-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update Copilot setup to use .NET SDK version from tools.dotnet #11891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
Co-authored-by: rainersigwald <[email protected]>
There was a problem hiding this 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 updates the GitHub Actions workflow to pull the .NET SDK version from the custom tools.dotnet property in global.json and supply it directly to actions/setup-dotnet.
- Added a step to extract the SDK version using
jqand set it in the environment - Switched
setup-dotnetfromglobal-json-fileto the extracteddotnet-versionparameter
Comments suppressed due to low confidence (2)
.github/workflows/copilot-setup-steps.yml:20
- [nitpick] Ensure this new step’s indentation matches the existing steps (two extra spaces), so it aligns under
steps:with other- uses:entries.
- name: Extract SDK version from global.json
.github/workflows/copilot-setup-steps.yml:23
- [nitpick] Verify that
jqis available on the runner (or add an install step) to avoid failures on environments wherejqisn’t preinstalled.
SDK_VERSION=$(jq -r '.tools.dotnet' global.json)
Co-authored-by: Copilot <[email protected]>
|
Looks like runtime actually does this a different way; we should probably do the same: |
…nstead of actions/setup-dotnet Co-authored-by: rainersigwald <[email protected]>
Good point! I've updated the approach to follow runtime's pattern. Instead of using |
Our repository uses a non-standard approach to specifying the .NET SDK version in global.json. Instead of using the standard
sdk.versionproperty, we use the Arcade-specifictools.dotnetelement.This PR updates the Copilot setup steps to:
tools.dotnetusingjqsetup-dotnetusing thedotnet-versionparameterBefore this change, Copilot was using the
global-json-fileparameter which doesn't understand our custom structure, potentially using an incorrect SDK version.Fixes #11890.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.