[C#] System.IO.FileNotFoundException


Hello everyone! Im trying to add dll for manage json to my clients, but in any way i do that i get error on client

System.IO.FileNotFoundException: Unable to find the specified file.

Here is my _resource.lua at that moment:

client_scripts {

Im already trying in testing different methods to add that dll to my clients file with no luck. Any help would be appreciated! :smiley:
Answering to question why im just cant use Newton’s json dll is that its doesnt fit all my needs. Also all my DLLs placed in same folder that contain _resource.lua



If I remember correctly, C# dll need to end by “net.dll”


Thanks for your reply!
Im checked github here => https://github.com/yuvalino/main-chat/blob/master/__resource.lua and there is Newtonsoft.Json.dll without any net.dll at the end. :thinking:


Humm, ok so the “net.dll” is maybe only for FiveM dll.

but I wonder if your error is because the dll isn’t found or if it’s when you try to open a file with your library.


Im trying to use it in my FiveM client dll with using, but its throw error about file cant found. I cant really figure out why dll cant be found if its in the folder same with resource.lua. :fearful:


Im also readed related problems on forum like THAT. Also tried recomendations in that threads. Still no luck.


Just to test, did you try if it works on server side?

I have an other idea, “client_script” is to transfer and execute the file, “file” like this will only transfer the file.


Thank for your reply!

Okay, i can now load dll i wanted to, but i cant find out how to get .mdb for newest versions (For example for System.Net.dll i guess its (Yes i know that i cant easly import it, but its only example))


Uh - these days Mono uses (embedded) portable PDBs.


Thank you for reply!

I still cant get it (lol), do i need to include PDBs to the client side?


You only need .dll on client side


If im set only dll like that:

file {



Its throw error about FileNotFoundException, but if im include .mdb its all right, but i cant get mdb or pdb for new version of dll. Here is log with .mdb:

Loaded System.Net, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a into ScriptDomain_911901468

and without it:

Failed to run a tick for Client: System.IO.FileNotFoundException: Could not load file or assembly 'System.Net, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.


What do you mean by “cant get mdb or pdb for new version of dll”?


I found this, if it’s what you’re looking for


For example: I need to use System.Net.dll on the client, the only way i can use it is include System.Net.dll.mdb to the client’s files, but i can find only old version of mdb. Sorry for a misunderstanding on my part, I did not quite understand how to use System.Net.dll or another windows lib on the client.


… using .mdbs has nothing to do with being able to load a library or not, in addition to that the client is sandboxed so you won’t be able to use any APIs from such libraries anyway.


K, thats pretty sad. Thank you all guys for help!