Skip to content

Conversation

@Shane32
Copy link
Owner

@Shane32 Shane32 commented Oct 5, 2025

This PR is currently opened only for review/discussion.

Summary by CodeRabbit

  • New Features

    • CI now performs a full solution build in key workflows to catch build issues earlier.
  • Chores

    • Simplified .NET target configuration to reduce platform-specific targets and unify behavior.
    • Consolidated drawing-library dependency handling for more consistent behavior across supported frameworks.
    • Adjusted test project targeting to align with Windows-focused test runs.

@Shane32 Shane32 self-assigned this Oct 5, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 5, 2025

📝 Walkthrough

Walkthrough

Adjusts project target frameworks and System.Drawing package conditions, updates Directory.Build.targets constants, adds explicit solution build steps to CI workflows, and replaces/updates large approved API snapshots for net6.0 and net60-windows test artifacts. No source-code public API signatures were intentionally modified in library sources.

Changes

Cohort / File(s) Summary
Project files
QRCoder/QRCoder.csproj, QRCoderTests/QRCoderTests.csproj, Directory.Build.targets
Modify TFMs and conditional compilation: remove explicit net5.0-windows/net6.0-windows from some csproj(s), introduce/normalize net6.0 targets, add/adjust Windows-specific TFMs in test project, change SYSTEM_DRAWING DefineConstants logic to exclude only netstandard1.3, and broaden System.Drawing.Common PackageReference condition to include net6.0 (retain 5.0.3 for older TFMs).
CI workflows
.github/workflows/wf-build-release-ci.yml, .github/workflows/wf-build-test.yml
Add new synchronous "Build solution" dotnet build -c Release steps into test/additional-tests jobs (runs before API approval and after publish respectively) to validate a full solution build in CI.
API approval / test artifacts
QRCoderApiTests/net60-windows/QRCoder.approved.txt, QRCoderApiTests/net60/QRCoder.approved.txt
Replace large approved API snapshots: one file removes the net60-windows public API surface entirely (deleting many public types), the other adds/updates numerous Windows-specific public types and overloads (ArtQRCode, QRCode, helpers, new overloads, and platform attributes). These files reflect major API-surface diffs in test expectations.

Sequence Diagram(s)

sequenceDiagram
  participant CI as GitHub Actions runner
  participant Build as dotnet build
  participant Test as API approval / test steps

  Note over CI: Existing workflow job
  CI->>+Build: dotnet publish (existing)
  CI->>+Build: dotnet build -c Release (NEW)
  Build-->>-CI: build result
  CI->>+Test: api-approval / tests
  Test-->>-CI: test result
  rect #e6ffed
    note right of CI: New explicit solution build step inserted before tests
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • codebude
  • gfoidl

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title concisely reflects the primary change of updating the System.Drawing.Common package reference across the project’s target frameworks, matching the modifications to the csproj and Directory.Build.targets to include drawing support on all platforms without unnecessary detail.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ref_drawing_net6

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 1

🧹 Nitpick comments (1)
QRCoder/QRCoder.csproj (1)

4-7: Remove the redundant property overrides.

These duplicate the TargetFrameworks and related settings defined a few lines below, so they get overwritten and only add confusion. Please drop the extra block or consolidate into a single property definition.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4783cc7 and d6ac6ca.

📒 Files selected for processing (1)
  • QRCoder/QRCoder.csproj (2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Format (Pull Request)
QRCoder/QRCoder.csproj

[error] 42-42: dotnet restore failed. MSB4025: The project file could not be loaded. The 'ItemGroup' start tag on line 33 position 4 does not match the end tag of 'Project'.

@Shane32
Copy link
Owner Author

Shane32 commented Oct 6, 2025

@gfoidl I'm reconsidering this change (meaning, I'm considering merging this PR). If we look at #489 we see a great number of issues raised due to people not understanding why the various classes are "missing" in .NET 6+. And these are just the people that couldn't find the solution and created an issue; many more people likely had the same problem but solved it themselves. Further, I've needed to help yet another person in the first week I've been maintaining the project.

It just seems to me to be simpler for everyone to include the reference to System.Drawing.Common for all target frameworks, letting the .NET Analyzers and/or MS exceptions inform developers if they try to use it on Linux.

If someone really wants to omit the System.Drawing.Common reference on Linux, they can stick with QRCoder 1.6.0, or use v2. But if we merge this, it will be binary-compatible with v1.4.x, the lack of which is a common cause of complaint.

Comments?

@Shane32 Shane32 changed the title [WIP] Reference System.Drawing.Common for all Core targets Reference System.Drawing.Common for all targets Oct 6, 2025
@Shane32 Shane32 added this to the 1.7.0 milestone Oct 6, 2025
@Shane32 Shane32 requested a review from gfoidl October 6, 2025 03:51
Copy link
Collaborator

@gfoidl gfoidl left a comment

Choose a reason for hiding this comment

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

OK, when it becomes less churn for the community it's good.

@Shane32 Shane32 merged commit 1faf65a into master Oct 6, 2025
8 checks passed
@Shane32 Shane32 deleted the ref_drawing_net6 branch October 6, 2025 12:01
@coderabbitai coderabbitai bot mentioned this pull request Oct 7, 2025
@Shane32 Shane32 added the enhancement A new feature or feature request label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A new feature or feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants