Skip to content

C#: usingZ variant not available via NuGet #1012

@SebastianDirks

Description

@SebastianDirks

It is currently not possible to use Clipper2 with the usingZ functionality enabled via the official NuGet channel. An unofficial package exists (https://packages.nuget.org/packages/Clipper2_usingZ ) but is outdated.

Because both variants share the same namespace and class names, the only way to use them together is assembly aliasing, which is cumbersome and does not propagate across dependency chains. A better approach would be to publish a separate package with a distinct namespace (e.g. Clipper2UsingZ), achieved via conditional compilation.

Use case:

  • XY-only Vertex data is prefered in generel because it is smaller and faster, but sometimes Z data is required for specific algorithms.
  • I have worked around this by renaming the namespace, building with USINGZ and publishing a USINGZ package to a private feed.
  • I now plan to open source a geometry library that depends on Clipper2, so public NuGet availability of both variants would be very useful.

I can submit a PR with namespace conditional compilation if this seems acceptable. This would however be a breaking change for current USINGZ source builds. An alternative would be to keep main unchanged and maintain a separate branch for the usingZ variant release. That avoids breaking changes but complicates release workflow. It requires switching branches and merging main.
In contrast, publishing via conditional compilation with package name overrides is easy to automate. I can assist with adapting release workflow scripts as well if desired.

If maintaining a usingZ package is not an option for you, I will solve this by publishing our internal build to NuGet instead as another unoffical package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions