[HELP] Server.net.dll is not working

Hello, I was trying to make a logging system with C# and script was working fine. I restarted my pc because of fps and ram issues and launched the server and started the script. And this error showed up:

Loaded Server.net, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null into ScriptDomain_186115493
Failed to instantiate instance of script Server.Main: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: rage-scripting-five.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) CitizenFX.Core.ScriptContext.GetNative(ulong)
  at CitizenFX.Core.ScriptContext.DoGetNative (System.UInt64 native) [0x00000] in <e95bfdb1ff9c4e69a73e356572a42c25>:0 
  at CitizenFX.Core.Native.API.InternalRegisterResourceAsEventHandler (System.String eventName) [0x00045] in <e95bfdb1ff9c4e69a73e356572a42c25>:0 
  at CitizenFX.Core.Native.API.RegisterResourceAsEventHandler (System.String eventName) [0x00000] in <e95bfdb1ff9c4e69a73e356572a42c25>:0 
  at CitizenFX.Core.EventHandlerDictionary.get_Item (System.String key) [0x00027] in <e95bfdb1ff9c4e69a73e356572a42c25>:0 
  at Server.Main..ctor () [0x0000f] in <87b3453887314601b681504910f88333>:0 
  at (wrapper managed-to-native) System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
   Exception_EndOfInnerExceptionStack
  at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x0001a] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
  at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00095] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean wrapExceptions, System.Boolean skipCheckThis, System.Boolean fillCache) [0x00009] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Boolean wrapExceptions, System.Threading.StackCrawlMark& stackMark) [0x00027] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00020] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <fbc4ec45371543bfba3678ebb82caf6d>:0 
  at CitizenFX.Core.InternalManager.CreateAssemblyInternal (System.String assemblyFile, System.Byte[] assemblyData, System.Byte[] symbolData) [0x000b1] in <e95bfdb1ff9c4e69a73e356572a42c25>:0 

I’m shocked because the scripts were running fine. Now after this error, only client script works. I tried adding rage-scripting-five.dll to resource folder and the main server folder but it didn’t help. I’m using these assemblies on my server:

using System;
using System.Net;
using System.Text;
using System.Net.Http;
using System.Net.Security;
using System.Threading.Tasks;
using System.Security.Cryptography.X509Certificates;

using Newtonsoft.Json;

using CitizenFX.Core;
using static CitizenFX.Core.Native.API;

Please help me and don’t forget, the script was working fine…

namespace Server
{
    public class Main : BaseScript
    {
        public Main()
        {
            EventHandlers["playerDied"] += new Action<int, int, int>(OnPlayerDied);
        }

When I delete the EventHandlers[… line, the server works fine. But you know, i need that line

I just found out I can’t add any Event Handler

Okay I found the solution, I deleted the CitizenFX.Core.dll from resource folder and it worked like a charm. This was the solution for me.