ektrah/libsodium-core

Sodium.Core Nuget package version 1.3.4 is not getting installed in .Net 4.8 project

Closed this issue · 6 comments

When I am trying to install, Sodium.Core nuget package version >= 1.3.0 in .Net 4.8 project, I am getting following error.
However older version of Sodium.Core nuget package is getting installed.

Could not install package 'libsodium 1.0.19'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework.

image

Do you know what could be the reason?
Is this library not suppose to use in .Net 4.8 project?

Thank you,
Sachin

This is a known issue with version 1.3.0, but should not happen with versions 1.3.1 and later. Could you try with version 1.3.4?

Thanks for the quick reply.
I tried with all the version from 1.3.0 to 1.3.4. :(

Could you please check if you are using PackageReference and not packages.config and the platform target of your project is set to x64 or x86 and not AnyCPU?

Yup, it is working.
I did set the x64 but not PackageReference.
Thank you very much :)

Hi @ektrah
Sorry, I am reopening this issue because I could not found any other way to ask this question :(
I saw that libsodium is recommending to not use nuget pkg built by them instead they are suggesting to build it yourself.
Do you know why libsodium suggesting it?
However, as we are using this wrapper and libsodium is already part of it.
Do we still need to build libsodium by ourself?
what do you suggest?

What libsodium recommends is that you use a wrapper like Sodium.Core and not develop your own wrapper. The reason for this is that developing a wrapper is not that easy.

It's perfectly fine to use the package they built if you're using Sodium.Core. All you have to do is add Sodium.Core as a PackageReference. Sodium.Core will then take care of the rest. 😃