Open jborlido opened 1 year ago
That package seems to only have an implementation DLL for net40 and not for netstandard so in order to use it you would need to set your Unity project to use .NET Framework instead of .NETStandard in project settings and then the package will properly install.
The .NETStandard package I'm using does contain a dll for .NET 2.0 because I had to download manually and install it on my project. Changing the .NET version of my project is not an option.
.NETStandard 2.0 dll is in the ref
folder which is reserved for referenced libraries afaik. NuGet for Unity looks for dlls inside lib
folder, and Mono.Posix.NETStandard 1.0.0
package only has net40
folder inside lib
, which is rendered as incompatible. It might not need .NETFramework functionalities for everything so some things might work, but some you might discover won't work only in the build. That is why NuGet for Unity can't just accept installing packages like this.
Can't you just uses Mono.Posix this has a dll for netstandard 2.0
I tried that as well, didn't work out
@JoC0de that package is shown only if Show Prerelease
is checked (@jborlido FYI). It seems to not delete its netstandard2.1
folder when I install it in Unity 2021.3.12f1 (similarly it leaves netstandard2.0
folder in 2018.4.36f1) from lib
in my case, which should be its expected behaviour. Although it does show some errors when installed (note that the error occured only in Unity 2021 and not in 2018 when I tested it). Screenshot attached.
@jborlido can you explain why you even need the package? For me the package sent to not contain functionally that is not already in unity. @popara96 ok this is strange i need to have a look
This is a dependency of another private package I'm using on my project.
Ok I looked at it the package is relay strange:
Mono.Posix.NETStandard
have no .dll for targeting netstandard (see comment of @igor84)Mono.Posix.NETStandard
depend on Mono.Posix
but not as a dependency they specifying it as a frameworkAssembly
(I don't know what this means and how this can be handled in the context of Unity)
Mono.Posix
seems to got renamed to Mono.Unix
Mono.Unix
works for me, no compiler issues when I install it in Unity 2022.2.1f1Mono.Posix
/ Mono.Unix
includes native binaries that are needed by the package to run flawlessly. So even if you install the package you will probably get issues when running the code that is using the package. Currently NuGetForUnity currently doesn't support this see #421.
Description
The problem is that when I try to install a NuGet package that has a DLL which is compatible with the .NET version of my Unity project but lower than that same version, it does not keep it in the project. I had to manually download and install this NuGet package on my project. It would be nice if versions lower but compatible could be downloaded and kept as well.