-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nuget installed package error #225
Comments
Firstlly, thank you for the helpful feedback. WRT the Nuget error, I'll certainly investigate that.
Please understand that i'm not overly proficient in C# (or C++), so I'm somewhat reliant on others for advice to get things right. And I'm rather bamboozled by the number of C# frameworks - .NET Standard, .NET Core, .NET Framework, .NET 5, .NET 6 - and deciding which is the best one for Clipper2. Anyhow, from my readings, it seemed to me that NET Standard 2.0 was the safest option for a cross platform library based on Microsoft's published advice here. Now, I'm guessing that MS's advice there needs updating, and I'm certainly open to other advice as to a better framework (and one that supports more than just the most up to date compilers). WRT your type question, I don't know how you can avoid adding Edit: After reading this page, I'm now wondering if it might be better to change the framework over to |
I'm not entirely sure it is caused by the dependency, but the settings are a bit messed up. For instance, you use IMHO, since there're a |
Update. My issue was resolved, but I don't know how. Then amazingly, the issue disappeared. For the Cost-wise, this should cost almost nothing in modern computers. |
Hopefully all fixed now (and |
No, what I mean by creating a separate class is on the library side. If you agree, you should add that to |
I'm afraid I don't understand what you're suggesting. |
I'm suggesting to create a class for that. Unless you have really specific downside, which I currently cannot see.
I agree. |
This is what I've done, and what I thought you were suggesting:
Do you have something else in mind?
I made those changes yesterday 😁. |
Hmm, interesting... I'm using .net framework 4.8 for the project that uses Im'not an expert in those frameworks either... need some help from others here. Perhaps Is it even possible to do "either/or" multidependency? |
@AngusJohnson Would it be possible to still target netstandard2.0 as well? I am using Clipper2 in NetFramework4.8 currently in Version 1.0.0 and an update of the Clipper2 package to 1.0.4 is not possible since .NetFramework (any version) does not support netstandard2.1 at all. |
I really need advice from experienced C# developers on the best way to package Clipper2 for Nuget. |
@AngusJohnson I'm somewhat experienced in C# (about 5 years) and will try to help. Regarding the original issue here: There is no way retargeting to .NET5.0 could have fixed xarthurx issue. The critical information missing is what .NET version his project is targeting. The Visual Studio error if the target framework is wrong reads something like "Package XXX is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package XXX supports: netstandard2.0 (.NETStandard,Version=v2.0)". Nuget will prevent install of that package in that case. |
I believe @SebastianDirks is correct and more experienced than me. |
Thanks Sebastian. I guess the question is what would you recommend going forward? |
I think I would recommend just going back to NetStandard2.0. Performance-wise the Just-In-Time Compiler is choosen based on the target of the project that is consuming Clipper2 library and optimization is also performed just in time or in NET6.0 even while running with the new Profile-guided optimization (PGO), C# differs from C++ here. |
OK, thanks again Sebastian. I'll revert the library to back to netstandard2.0 in due course . |
Changed Library's C# target framework back to netstandard2.0 (#225) Updated several sample apps. File headers updated to version 1.0.5
Bear in mind however that NetStandard2.0 limits the APIs available to you. Say for example you wanted to use SIMD somewhere the codebase. You'd need to multitarget to add NET6 (Don't target NET5 as it's out of support) |
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 fromnuget
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:In my own program:
Clipper2/CSharp/Clipper2Lib.Examples/InflateDemo/Main.cs
Line 20 in dbc4020
May I ask why is so?
The text was updated successfully, but these errors were encountered: