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:
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
- Added support for multiple C# frameworks (#225) — committed to AngusJohnson/Clipper2 by AngusJohnson 2 years ago
- Fixed bug in C++ Point<T> constructor when USINGZ defined (#246) Changed Library's C# target framework back to netstandard2.0 (#225) Updated several sample apps. File headers updated to version 1.0.5 — committed to AngusJohnson/Clipper2 by AngusJohnson 2 years ago
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 usingPointD
outsideClipper2
. I don’t know what yourdownside
is exactly.Cost-wise, this should cost almost nothing in modern computers.