Repository navigation
CONFIG: Fix net10.0 targets paths, add LibPostalAutoDownload opt-out, document usage - #102
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes NuGet package build/publish behavior by correcting the packaged native/content file paths for net10.0, adding an MSBuild opt-out for automatic libpostal data download, and documenting end-to-end usage in the README so consumers can successfully install and use the library.
Changes:
- Update
NHSISL.LibPostalClient.targetsto resolve native/header assets fromcontentFiles/any/net10.0/(instead ofnet8.0/). - Add
LibPostalAutoDownload(defaulttrue) to gate data download on both build and publish, and preventCleanfrom deletingLibpostalData.zipwhen opted out. - Expand
README.mdwith install, parse/expand examples, configuration guidance, and test-project usage notes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Adds usage documentation, examples, configuration table, and guidance for controlling downloads and test-project usage. |
| NHSISL.LibPostalClient/NHSISL.LibPostalClient.targets | Fixes content file paths to net10.0 and introduces LibPostalAutoDownload gating for download/clean/publish behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
589d324 to
9ebead2
Compare
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
Two changes to NHSISL.LibPostalClient.targets. 1. Release blocker. Commit b3442e9 moved the packed native files from contentFiles/any/net8.0 to contentFiles/any/net10.0, but the targets file still resolved Headers, WindowsNativeFiles and LinuxNativeFiles from the net8.0 paths. Verified against a real consumer project: the unfixed package fails the consumer build outright with MSB3030 ("Could not copy ... contentFiles/any/net8.0/libpostal.h"), and no native library reaches the output directory. 2. Issue #97. Adds a LibPostalAutoDownload MSBuild property, defaulting to true so current behaviour is unchanged. When set to false the LibpostalData.zip download is skipped on both build and publish, and Clean no longer deletes the zip, which is what caused the next build to download it again. Verified with a consumer project referencing the packed package: natives copy to the output directory, and LibPostalAutoDownload=false suppresses the download. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Addresses #52, open since September 2024, which asked how to actually use the package. The README had no usage section at all. Adds install, parse and expand examples, a configuration table, the LibPostalAutoDownload option, and a note on the test project DllNotFoundException reported in #58 with its workaround. All code samples and their outputs were run against the package built from this branch, so the parser labels shown are real output rather than illustrative. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
9ebead2 to
36cd744
Compare
Fixes AB#29898
Also addresses #97 and #52.
1. Release blocker — native files not found (no issue, found while reviewing #97)
b3442e9moved the packed natives fromcontentFiles/any/net8.0/tocontentFiles/any/net10.0/, butNHSISL.LibPostalClient.targetsstill resolved them from the net8.0 paths. The targets file was never updated.Verified against a real consumer project referencing the packed package:
mainMSB3030libpostal-1.dll,libpostal.hThe unfixed error:
This is a hard build failure for every consumer, not a runtime error. It would have shipped in v1.0.1.0.
2.
LibPostalAutoDownloadopt-out (#97)Adds an MSBuild property, default
trueso existing behaviour is unchanged:When
false: the download is skipped on both build and publish, andCleanno longer deletesLibpostalData.zip— which was what caused the next build to re-download it.Note the publish path (
PrepLibPostalPublish) downloaded unconditionally on every publish, so that is now gated and existence-checked too.Verified:
LibPostalAutoDownload=falseCleanwith opt-outCleandefault3. README usage docs (#52)
Open since September 2024, asking how to actually use the package — the README had no usage section. Adds install, parse and expand examples, a config table, the new opt-out, and a note on the #58 test-project
DllNotFoundExceptionwith its workaround.All samples and their outputs were run against the package built from this branch, so the parser labels are real output.
🤖 Generated with Claude Code