-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unhandled Exception: System.IO.FileNotFoundException #11
Comments
Hi @xnetdude, a couple of questions:
Thanks, |
*** updated after installaling the correct nuget package *** Hi Matt, Thanks for your reply. We have .net 4.7 on both test servers. One where we installed VS2017 and then the TestApp worked, and then we simply copied the contents of the microsoft\libyara.NET\TestApp\bin\x64\Debug to the second server where it showed the error in my OP. Referencing Microsoft.O365.Security.Native.libyara.NET and removing libyara.dll from the TestApp works without error, what does this tell us? Greatly appreciate any more thoughts. Thanks. James. |
Hi Matt - still seeing this with directly using the nuget package both x86 and x64: Could not load file or assembly 'libyara.NET.dll' or one of its dependencies. The specified module could not be found. : Any further thoughts? TIA. |
@xnetdude Hello. I met this issue and revealed that Visual C++Redistributable is need for libyaranet to work. Installation of it resloved my issue. |
I have the same problem, when I use nuget package "Microsoft.O365.Security.Native.libyara.NET" it works perfectly. But if I download and compile the "libyara.dll" library normally and add it to my project, it gives this same error and I have not found how to solve it. I hope you can help me. Thank you. |
I have encountered the same issue. When I use the NuGet package for .NET Framework, there are no problems. However, when I use the package for .NET Core, I encounter an issue where 'libyara.NET.dll' cannot be loaded. Additionally, my project is targeting .NET 7, while the NuGet package specifies .NET 6. I'm not sure if this is the cause of the problem. However, it's worth noting that the program is written in CPP/CLR, so it "might" have stricter framework requirements. In the past, third-party components with .NET 6 packages were MSIL, and theoretically, referencing them directly in .NET 7 should not be an issue. If possible, it would be advisable for 'libyara.NET' to provide multiple versions of the NuGet package, including the latest for the .NET . |
I have found a solution:
|
Hi,
Really can't find the issue here,
I have a working install on dev system with the YARA engine but when deployed the TestApp (from this project) to a server I get this:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'libyara.NET.dll' or one of its dependencies. The specified module could not be found.
Have done all the usual dependency walking stuff, checking the file isnt locked (or obv missing) but still no joy.
I resorted to installing a new copy of VS2017 onto a virgin Windows Server 2016 box and then compiled this project and abd the TestApp aworked! Copy all the contents of microsoft\libyara.NET\TestApp\bin\x64\Debug to problem server and get the same error.
For me, it's either VS2017 is installing some dependency which this library needs or there is some lock to the machine it's compiled on - either way I can't figure it out so really appreciate any help or guidance on this.
Thanks.
J.
The text was updated successfully, but these errors were encountered: