Skip to content

Introduce agentic-workflow to manage and update CsWin32 Package#65528

Merged
DeagleGross merged 14 commits intodotnet:mainfrom
DeagleGross:dmkorolev/cswin32-update-agentworkflow
Apr 7, 2026
Merged

Introduce agentic-workflow to manage and update CsWin32 Package#65528
DeagleGross merged 14 commits intodotnet:mainfrom
DeagleGross:dmkorolev/cswin32-update-agentworkflow

Conversation

@DeagleGross
Copy link
Copy Markdown
Member

CsWin32 Package is a good candidate to test out agentic-workflow updates, since it was not updated for a long time (see #65516)

I am proposing to use an agentic-workflow, which will periodically:

  1. check if there is a newer version on NuGet, and update if there is one
  2. verify if there are possibilities to improve APIs or remove our workarounds (like hardcoding enum values - we have to do it sometimes when API is already there and we are implementing a feature, but package did not obtain new members yet).

It should not be a burden to review small PRs making a small change, but will keep codebase up to date.

Test runs:

Closes #63686

Copilot AI review requested due to automatic review settings February 24, 2026 13:00
@DeagleGross DeagleGross requested review from a team and wtgodbe as code owners February 24, 2026 13:00
@DeagleGross DeagleGross self-assigned this Feb 24, 2026
@github-actions github-actions bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 24, 2026
Copy link
Copy Markdown
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 pull request introduces an agentic workflow to automate the monthly maintenance of the Microsoft.Windows.CsWin32 package dependency. The workflow will check for new stable package versions, update the version in eng/Versions.props if needed, and systematically search for and remove workarounds that were added for missing Win32 APIs, enum values, or types that are now available in newer CsWin32 releases.

Changes:

  • Adds a monthly scheduled workflow using the agentic workflow framework (.md definition + compiled .lock.yml)
  • Configures safe-inputs tool to query NuGet API for latest package versions
  • Documents comprehensive patterns for identifying CsWin32 workarounds (hardcoded enum casts, manual P/Invoke declarations, manual struct definitions, TODO comments)
  • Marks generated .lock.yml files as linguist-generated in .gitattributes

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/cswin32-update.md Workflow definition with frontmatter configuration, documentation, and detailed instructions for version checking, building, and workaround cleanup
.github/workflows/cswin32-update.lock.yml Auto-generated GitHub Actions workflow file compiled from the .md definition (contains typo from source)
.github/aw/actions-lock.json Action version pinning for actions/github-script@v8 and gh-aw/actions/setup@v0.45.5
.gitattributes Marks .github/workflows/*.lock.yml as linguist-generated with merge strategy 'ours'

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Mar 3, 2026
Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

Can you update the agent to leave a comment on these PRs telling a dev to kick off https://dev.azure.com/dnceng/internal/_build?definitionId=931&_a=summary?

@DeagleGross DeagleGross merged commit 7cbda0e into dotnet:main Apr 7, 2026
10 checks passed
@DeagleGross DeagleGross deleted the dmkorolev/cswin32-update-agentworkflow branch April 7, 2026 20:30
@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview4 milestone Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chore: update Microsoft.Windows.CsWin32 and modernize code

3 participants