Skip to content

Fix packaging of managed drivers#203

Merged
josesimoes merged 1 commit into
nanoframework:developfrom
josesimoes:fix-managed-packaging
Jul 3, 2026
Merged

Fix packaging of managed drivers#203
josesimoes merged 1 commit into
nanoframework:developfrom
josesimoes:fix-managed-packaging

Conversation

@josesimoes

Copy link
Copy Markdown
Member

Description

  • Nuspec files are now including the managed driver files.
  • Managed drivers projects are now referencing nbgv, thus producing valid assemblies with proper version attributes.

Motivation and Context

  • Add missing manged library files to nuget package.
  • Assemblies are now valid with proper version attributes.

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

- Nuspec files are now including the managed driver files.
- Managed drivers projects are now referencing nbgv, thus producing valid assemblies with proper version attributes.
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added consistent versioning support across multiple graphics driver projects.
    • Enabled locked package restore for CI builds to improve build reliability.
  • Bug Fixes

    • Added clearer build errors when required package build files are missing.
    • Updated package manifests so each driver includes the correct build output from its own project folder.

Walkthrough

This PR adds Nerdbank.GitVersioning build integration (conditional MSBuild imports, RestoreLockedMode, and EnsureNuGetPackageBuildImports validation targets) to nine ManagedDrivers project files, with corresponding packages.config and packages.lock.json entries, and updates nuspec files to reference per-driver ManagedDrivers build output paths instead of a shared path.

Changes

GitVersioning Build Integration

Layer / File(s) Summary
Per-driver GitVersioning MSBuild wiring
ManagedDrivers/*/nanoFramework.Graphics.*.nfproj
Each project file conditionally imports Nerdbank.GitVersioning props/targets, sets RestoreLockedMode for CI builds, and adds an EnsureNuGetPackageBuildImports target that errors on missing files.
Package references and lock entries
ManagedDrivers/*/packages.config, ManagedDrivers/*/packages.lock.json
Adds Nerdbank.GitVersioning 3.10.85 as a development dependency in packages.config and a corresponding Direct dependency entry with contentHash in packages.lock.json for each driver.

Nuspec Packaging Path Updates

Layer / File(s) Summary
Per-driver build output path corrections
nanoFramework.Graphics.*.nuspec
Each nuspec's file entry is repointed from the shared nanoFramework.Graphics\bin\Release\... path to the driver-specific ManagedDrivers\<Driver>\bin\Release\... path, keeping the lib\netnano1.0 target unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: Type: dependencies

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing managed driver packaging.
Description check ✅ Passed The description matches the changes by describing nuspec updates and managed driver NBGV references.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@josesimoes

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ManagedDrivers/Gc9A01/nanoFramework.Graphics.Gc9A01.nfproj`:
- Line 3: The GitVersioning import and NuGet restore/build-import wiring in the
ManagedDrivers driver project files is duplicated across all the .nfproj files.
Move the shared setup into a single ManagedDrivers-root
Directory.Build.props/Directory.Build.targets pair, and keep the individual
project files referencing only what is truly project-specific so the
Nerdbank.GitVersioning import, RestoreLockedMode, and
EnsureNuGetPackageBuildImports logic are maintained in one place.

In `@ManagedDrivers/Ili9341/nanoFramework.Graphics.Ili9341.nfproj`:
- Line 3: The Nerdbank.GitVersioning setup is duplicated across multiple
ManagedDrivers project files, including the import in Ili9341 and the related
restore/targets wiring. Move the shared GitVersioning configuration into a
common Directory.Build.props and Directory.Build.targets under ManagedDrivers so
all projects inherit it automatically, and remove the repeated hardcoded 3.10.85
import blocks from each project file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: nanoframework/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1ad140ba-d5f8-41f2-b052-7225413a6171

📥 Commits

Reviewing files that changed from the base of the PR and between 772a0e8 and cb735ef.

📒 Files selected for processing (32)
  • ManagedDrivers/Gc9A01/nanoFramework.Graphics.Gc9A01.nfproj
  • ManagedDrivers/Gc9A01/packages.config
  • ManagedDrivers/Gc9A01/packages.lock.json
  • ManagedDrivers/Ili9341/nanoFramework.Graphics.Ili9341.nfproj
  • ManagedDrivers/Ili9341/packages.config
  • ManagedDrivers/Ili9341/packages.lock.json
  • ManagedDrivers/Ili9342/nanoFramework.Graphics.Ili9342.nfproj
  • ManagedDrivers/Ili9342/packages.config
  • ManagedDrivers/Ili9342/packages.lock.json
  • ManagedDrivers/Otm8009A/nanoFramework.Graphics.Otm8009A.nfproj
  • ManagedDrivers/Otm8009A/packages.config
  • ManagedDrivers/Otm8009A/packages.lock.json
  • ManagedDrivers/Ssd1306/nanoFramework.Graphics.Ssd1306.nfproj
  • ManagedDrivers/Ssd1306/packages.config
  • ManagedDrivers/Ssd1306/packages.lock.json
  • ManagedDrivers/Ssd1331/nanoFramework.Graphics.Ssd1331.nfproj
  • ManagedDrivers/Ssd1331/packages.config
  • ManagedDrivers/Ssd1331/packages.lock.json
  • ManagedDrivers/St7735/nanoFramework.Graphics.St7735.nfproj
  • ManagedDrivers/St7735/packages.config
  • ManagedDrivers/St7735/packages.lock.json
  • ManagedDrivers/St7789/nanoFramework.Graphics.St7789.nfproj
  • ManagedDrivers/St7789/packages.config
  • ManagedDrivers/St7789/packages.lock.json
  • nanoFramework.Graphics.Gc9A01.nuspec
  • nanoFramework.Graphics.Ili9341.nuspec
  • nanoFramework.Graphics.Ili9342.nuspec
  • nanoFramework.Graphics.Otm8009A.nuspec
  • nanoFramework.Graphics.Ssd1306.nuspec
  • nanoFramework.Graphics.Ssd1331.nuspec
  • nanoFramework.Graphics.St7735.nuspec
  • nanoFramework.Graphics.St7789.nuspec

Comment thread ManagedDrivers/Gc9A01/nanoFramework.Graphics.Gc9A01.nfproj
Comment thread ManagedDrivers/Ili9341/nanoFramework.Graphics.Ili9341.nfproj
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@josesimoes josesimoes merged commit 4adac6a into nanoframework:develop Jul 3, 2026
8 checks passed
@josesimoes josesimoes deleted the fix-managed-packaging branch July 3, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants