Hello everyone, I would like to use the ZeroTier.Sockets library for my C # application, but when trying to install ZeroTier.Sockets I get the error “Please make sure that the file is accessible and that it is a valid assembly or COM component”. Where can I find libzt.dll?
Hello,
Check this ticket: [NuGet Package] Failed to add reference to 'libzt' · Issue #102 · zerotier/libzt · GitHub
Your project should use the newer PackageReference
standard if possible. If that doesn’t fix it, let me know.
P.S. VS’s caching of project settings is broken somehow and you may need to flip this setting multiple times and restart VS for it to take effect.
That’s because you’re loading a package marked as x64
in a x86
32-bit project. You need to set that to the correct value.
Hi everyone,
I also have troubles with the ZeroTier.Sockets library.
I am getting the following warning:
" Resolved file has a bad image, no metadata, or is otherwise inaccessible. System.BadImageFormatException: Could not load file or assembly ‘libzt.dll’ or one of its dependencies. The module was expected to contain an assembly manifest. "
I have tried version 1.4.1, 1.4.2. and 1.4.3 and still get the same warning. I am using the newer PackageReference standard.
Hey @eob
Could you tell me the version of Windows, Visual Studio, and what architecture you’re running if not x86-64? Your project’s architecture should be set to 64 bit in order for this to work.
Additionally, Visual Studio’s package management cache is inconsistent at times so you may have to toggle the setting, clear the cache and restart VS for packages to work sometimes.
Let me know if that doesn’t help.
Hey @zt-joseph
Thanks for you’re quick reply.
I am working on a windows 10 version 64 bit. I am using VS 2019 with the latest update. A tried to clear the cache setting. I did not switched the settings a couple of times yet.
I have also tried this on a Windows server 2016 machine also VS 2019. It had the same warning.
I just tried a third PC also windows 10 64 bit. Same VS version (2019) This time I switched a couple of time the package management format. but also the same warning.
I can run the project but the node will never go online, so that is why I am looking at this warning
I get the same error ,can’t made the node.Online to true, my computer is windows10,vs2019.Do you solve the problem?