GlitchEnzo / NuGetForUnity

A NuGet Package Manager for Unity
MIT License
2.91k stars 303 forks source link

Oxyplot.WindowsForms package not correctly installing #569

Open CosmicElysium opened 9 months ago

CosmicElysium commented 9 months ago

Oxyplot.WindowsForms package NuGetForUnity 3.1.3 Unity 2021.3.17 Windows 11

Installing this package is recently causing compile errors (possibly last month or two). Specifically with the following Unity error when using code in the project that makes use of the package:

The type or namespace name 'WindowsForms' does not exist in the namespace 'OxyPlot' (are you missing an assembly reference?)

NuGetForUnity thinks the package is successfully installed, but there are no libraries installed in the Assets\Packages\OxyPlot.WindowsForms.2.1.2\lib directory of the project. It is totally empty.

A successful workaround is to use an external installation of Oxyplot.WindowsForms (with Rider or Visual Studio) and manually copying over the net45 directory with the containing .dll and .xml files into the lib directory.

JoC0de commented 9 months ago

Hi, Thanks for creating a issue. What API compatible setting do you use in the project? See https://docs.unity3d.com/Manual/dotnetProfileSupport.html

CosmicElysium commented 9 months ago

Hi, Thanks for creating a issue. What API compatible setting do you use in the project? See https://docs.unity3d.com/Manual/dotnetProfileSupport.html

Hey. The project is set to .NET Standard 2.1

JoC0de commented 9 months ago

This is the Issue, the package officially only supports .Net Framework and .Net Core 3.1 see: https://www.nuget.org/packages/OxyPlot.WindowsForms#supportedframeworks-body-tab so NuGetForUnity doesn't install it. Normally you should receive a warning that the package has no matching / supported lib folder. I already was thinking about a feature that allows you to 'force' installing such a package but until now I never seen a package that works even if "shouldn't".

CosmicElysium commented 9 months ago

This is the Issue, the package officially only supports .Net Framework and .Net Core 3.1 see: https://www.nuget.org/packages/OxyPlot.WindowsForms#supportedframeworks-body-tab so NuGetForUnity doesn't install it. Normally you should receive a warning that the package has no matching / supported lib folder. I already was thinking about a feature that allows you to 'force' installing such a package but until now I never seen a package that works even if "shouldn't".

Okay. Changing the API Compatibility setting to .Net Framework seems to have solved the issue. I'm guessing such a "force" installation feature would work here because of the external libraries working after copying them in.

Thank you.