Skip to content

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

Open
DeagleGross wants to merge 8 commits intodotnet:mainfrom
DeagleGross:dmkorolev/cswin32-update-agentworkflow
Open

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

Conversation

@DeagleGross
Copy link
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
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
Copy link
Contributor

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

@dotnet-policy-service
Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@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
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

2 participants