Skip to content

Validate the NuGet package and test the demo app against it - #101

Merged
webgio merged 1 commit into
masterfrom
net10-support
Oct 8, 2026
Merged

webgio merged 1 commit into
masterfrom
net10-support

Conversation

@webgio

@webgio webgio commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Follow-up to #100. This commit was pushed after #100 was merged, so it wasn't included.

Summary

  • Package validation. dotnet pack (and every build, since the project packs on build) now fails on API differences between target frameworks and on breaking changes since the last published version, with 1.4.0 as the baseline.
    • Two existing, deliberate differences are recorded in CompatibilitySuppressions.xml. The extension class is named RotativaAppBuilderExtensions on net5.0 but MvcServiceCollectionExtensions on net6.0+. RotativaConfiguration.Setup(IHostingEnvironment, ...) exists only in the netstandard2.0 build.
    • After each release, update PackageValidationBaselineVersion to the version just published.
  • Tests against the real .nupkg.
    • The DemoApp can reference the packed package instead of the project (UseRotativaPackage=true plus RotativaPackageVersion).
    • It restores through package-test.nuget.config, so Rotativa.AspNetCore can only come from the local artifacts/packages folder.
    • docker build --build-arg USE_ROTATIVA_PACKAGE=true ... packs the library, builds the DemoApp against the package, and checks .deps.json to confirm the package was used.
  • CI. The test job now runs twice, once against the project and once against the package.
  • README. The tests section explains both checks.

Test plan

  • Negative test: making a public property internal fails a clean build with CP0002 against 1.4.0. With the change reverted, the build passes.
  • Locally (Docker, Linux arm64), all 10 tests pass in both project and package mode. .deps.json shows "type": "package" and "type": "project" respectively.
  • Manual workflow run on this commit passed all three jobs: https://github.com/webgio/Rotativa.AspNetCore/actions/runs/37796461174
  • Workflow passes on this PR.

🤖 Generated with Claude Code

- Enable package validation with 1.4.0 as the baseline: packing now fails
  on API differences between target frameworks or breaking changes since
  the last release. The two existing, intentional differences are recorded
  in CompatibilitySuppressions.xml.
- DemoApp can reference the packed .nupkg instead of the project
  (UseRotativaPackage + RotativaPackageVersion), restored through
  package-test.nuget.config so the package comes only from the local feed.
- Dockerfile: USE_ROTATIVA_PACKAGE=true packs the library, builds the demo
  app against the package and checks deps.json confirms it.
- CI runs the test job for both project and package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@webgio
webgio merged commit f0140c8 into master Oct 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant