Skip to content

Conversation

Jack251970
Copy link
Member

@Jack251970 Jack251970 commented Aug 29, 2025

Downgrade System.Drawing.Common to 7.0.0

Follow on with #3846.

Downgrade System.Drawing.Common to 7.0.0 to resolve PlatformNotSupportedException: SystemEvents is not supported on this platform in Microsoft.Win32.SystemEvent calling.

Test

After this PR, this issue is fixed:

Jack251970/Flow.Launcher.Plugin.UninstallerPlus#5

Copy link
Contributor

coderabbitai bot commented Aug 29, 2025

📝 Walkthrough

Walkthrough

Version downgrades to 7.0.0 for System.Drawing.Common and Microsoft.Win32.SystemEvents across Infrastructure project and related lockfiles. Updated dependency constraints and content hashes. Added comments in Flow.Launcher.Infrastructure.csproj explaining potential PlatformNotSupportedException with newer versions.

Changes

Cohort / File(s) Summary of Changes
Project reference update
Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
Downgraded PackageReference for System.Drawing.Common from 9.0.7 to 7.0.0; added comments about SystemEvents PlatformNotSupportedException on newer versions.
Lockfile downgrades to 7.0.0
Flow.Launcher.Core/packages.lock.json, Flow.Launcher.Infrastructure/packages.lock.json, Flow.Launcher/packages.lock.json
Resolved versions for System.Drawing.Common and Microsoft.Win32.SystemEvents downgraded from 9.0.7 to 7.0.0; updated transitive dependency mappings and contentHash; adjusted dependency constraints to [7.0.0, ).

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • update to .net 9 #3286 — Adjusts the same packages (System.Drawing.Common, Microsoft.Win32.SystemEvents) and related project/lock files, indicating closely related dependency management changes.

Suggested reviewers

  • jjw24
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test_system_events

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added this to the 2.0.0 milestone Aug 29, 2025
Copy link

gitstream-cm bot commented Aug 29, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

@Jack251970 Jack251970 changed the title Use 7.0.0 SystemEvents Fix SystemEvents Issue Aug 29, 2025
@prlabeler prlabeler bot added the bug Something isn't working label Aug 29, 2025
@Jack251970 Jack251970 added Dev branch only An issue or fix for the Dev branch build and removed bug Something isn't working labels Aug 29, 2025
@Jack251970 Jack251970 requested a review from Copilot August 29, 2025 03:47
Copy link
Contributor

@Copilot 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 PR fixes a SystemEvents issue by upgrading the Microsoft.Win32.SystemEvents package from version 9.0.7 to 9.0.8 and explicitly adding it as a direct dependency in the Infrastructure project.

  • Updates Microsoft.Win32.SystemEvents from 9.0.7 to 9.0.8 across multiple projects
  • Adds explicit direct dependency on Microsoft.Win32.SystemEvents in Flow.Launcher.Infrastructure
  • Updates package lock files to reflect the new dependency structure

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Flow.Launcher/packages.lock.json Updates SystemEvents version and adds explicit dependency reference
Flow.Launcher.Infrastructure/packages.lock.json Changes SystemEvents from transitive to direct dependency
Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj Adds explicit PackageReference for SystemEvents 9.0.8
Flow.Launcher.Core/packages.lock.json Updates SystemEvents version and adds dependency reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@prlabeler prlabeler bot added the bug Something isn't working label Aug 29, 2025
@Jack251970 Jack251970 changed the title Fix SystemEvents Issue Downgrade System.Drawing.Common to 7.0.0 Aug 29, 2025
Copy link

gitstream-cm bot commented Aug 29, 2025

🥷 Code experts: no user but you matched threshold 10

Jack251970 has most 👩‍💻 activity in the files.
Jack251970 has most 🧠 knowledge in the files.

See details

Flow.Launcher.Core/packages.lock.json

Activity based on git-commit:

Jack251970
AUG
JUL 103 additions & 64 deletions
JUN
MAY
APR
MAR

Knowledge based on git-blame:
Jack251970: 37%

Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj

Activity based on git-commit:

Jack251970
AUG
JUL 10 additions & 17 deletions
JUN
MAY
APR 4 additions & 1 deletions
MAR 0 additions & 1 deletions

Knowledge based on git-blame:
Jack251970: 26%

Flow.Launcher.Infrastructure/packages.lock.json

Activity based on git-commit:

Jack251970
AUG
JUL 92 additions & 49 deletions
JUN
MAY
APR
MAR

Knowledge based on git-blame:
Jack251970: 46%

Flow.Launcher/packages.lock.json

Activity based on git-commit:

Jack251970
AUG
JUL 498 additions & 282 deletions
JUN
MAY
APR
MAR

Knowledge based on git-blame:
Jack251970: 56%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

@Jack251970 Jack251970 enabled auto-merge August 29, 2025 05:05
@Jack251970 Jack251970 added the dependencies Pull requests that update a dependency file label Aug 29, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj (1)

3-16: Lockfile enforcement in CI.

You already set RestorePackagesWithLockFile here. Ensure pipeline uses dotnet restore --locked-mode for all projects to avoid accidental upgrades.

Flow.Launcher/packages.lock.json (1)

865-866: Project constraint adjusted to [7.0.0, ).

Nice alignment across solution boundaries. Consider centralizing these pins in a Directory.Packages.props to avoid scattering version decisions.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 54e4c13 and 054135d.

📒 Files selected for processing (4)
  • Flow.Launcher.Core/packages.lock.json (3 hunks)
  • Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj (1 hunks)
  • Flow.Launcher.Infrastructure/packages.lock.json (2 hunks)
  • Flow.Launcher/packages.lock.json (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.
📚 Learning: 2024-10-08T15:52:58.573Z
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.

Applied to files:

  • Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
  • Flow.Launcher.Infrastructure/packages.lock.json
  • Flow.Launcher/packages.lock.json
  • Flow.Launcher.Core/packages.lock.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream workflow automation
  • GitHub Check: gitStream.cm
  • GitHub Check: build
🔇 Additional comments (7)
Flow.Launcher.Infrastructure/packages.lock.json (1)

159-161: Transitive Microsoft.Win32.SystemEvents = 7.0.0 confirmed.

Good alignment with the intended workaround for the PlatformNotSupportedException.

Flow.Launcher.Core/packages.lock.json (3)

164-166: Core resolves Microsoft.Win32.SystemEvents to 7.0.0.

Matches Infrastructure; reduces mismatch risk at runtime.


225-229: System.Drawing.Common locked to 7.0.0 (transitive).

Aligned with Infrastructure. Keep an eye on upstream packages that may try to raise this.

Run in CI: dotnet restore --locked-mode to enforce the lock.


265-266: Constraint updated to [7.0.0, ) for Infrastructure.

Nice. This makes the intent explicit at the project boundary.

Flow.Launcher/packages.lock.json (3)

555-557: Transitive Microsoft.Win32.SystemEvents resolved to 7.0.0 at app level.

Good; consistent with Core/Infrastructure.


680-684: System.Drawing.Common resolved to 7.0.0 at app level.

Matches the intended pin; helps prevent the NotSupported exception.


1-875: Run a local vulnerability scan for older package pins
CI couldn’t execute dotnet list package --vulnerable; please run a local scan to confirm no known CVEs affect System.Drawing.Common 7.0.0 (direct) or the transitive System.Drawing.Common 4.7.0/Microsoft.Win32.SystemEvents 7.0.0 dependencies and share the findings. RestorePackagesWithLockFile is correctly enabled.

@Jack251970 Jack251970 merged commit 0f243fa into dev Aug 30, 2025
21 checks passed
@Jack251970 Jack251970 deleted the test_system_events branch August 30, 2025 05:14
@jjw24 jjw24 removed bug Something isn't working dependencies Pull requests that update a dependency file 1 min review labels Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev branch only An issue or fix for the Dev branch build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants