Skip to content
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

Oxyplot.WindowsForms package not correctly installing #569

Open
CosmicElysium opened this issue Sep 25, 2023 · 4 comments
Open

Oxyplot.WindowsForms package not correctly installing #569

CosmicElysium opened this issue Sep 25, 2023 · 4 comments

Comments

@CosmicElysium
Copy link

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.

@CosmicElysium CosmicElysium changed the title Oxyplot.WindowsForms not correctly installing Oxyplot.WindowsForms package not correctly installing Sep 25, 2023
@JoC0de
Copy link
Collaborator

JoC0de commented Sep 25, 2023

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
Copy link
Author

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
Copy link
Collaborator

JoC0de commented Sep 27, 2023

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants