Clipper2: nuget installed package error

Hello, I’m new to this lib and am about to test it due to the fantastic description.

OS: Windows 11 VS: VS 2022

nuget issue

I’m developing some program in C# and installed the library from nuget package management system. However, unlike other packages, Visual Studio reports:

image

I’m not sure if this is due to some configuration of Clipper2 in the nuget system or on my side. This has never happened to me for other nuget packages…

Cloning the repo and compiling the demo has no problem. Only nuget package has this error.

possible .net dependency issue

Based on a comment here: https://stackoverflow.com/questions/73130417/visual-studio-c-sharp-nuget-package-that-was-installed-cannot-be-found-with-usi

It seems this might be caused by Clipper2 is only depending on .NET 2.0, which is very old. Perhaps targeting .NET framework 4.5+ or .NET 5+ might solve the issue?

type question

Besides, based on the demo file, it seems there is no PathsD defined, but I need to manually do the:

    using PathsD = List<List<PointD>>;

In my own program: https://github.com/AngusJohnson/Clipper2/blob/dbc4020503cf80289378bdadd5b01da06ad8c1e5/CSharp/Clipper2Lib.Examples/InflateDemo/Main.cs#L20

May I ask why is so?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Update.

My issue was resolved, but I don’t know how. I cloned the repo and switched between several framework, build local version of nuget packages and install/uninstall. During the process, I also installed several framework from VS Installer.

Then amazingly, the issue disappeared.

For the typedef issue, I would recommend creating a separate class for that, since no one is using PointD outside Clipper2. I don’t know what your downside is exactly.

Cost-wise, this should cost almost nothing in modern computers.