[C#] NativeUI failing to load

Hi,
I’ve been trying to compile my Client file with a NativeUI menu, however, it builds successfully but fails when it tries to load in-game. It keeps saying “FileNotFound” and NativeUI fails to load. I’ve tried the following:

  • Adding the NativeUI.dll to client_script
  • Renaming NativeUI.dll to NativeUI.net.dll
  • Downloading and compiling the same NativeUI vMenu uses

I cannot get it to load on the Client, as such my Client.net.dll fails.
My project is pretty much a clean slate, all I’ve done is added NativeUI as a reference, built the menu and compiled.

Any ideas?

2 Likes

Are you using this or something else?

The one that I’m using is the same one vMenu is using, which is a modified version of the ported version.
I tried the original ported version but GTA was never defined so I had troubles building it.
I would like to mention that NativeUI.net.dll is trying to be loaded before any other client script, but it’s always throwing a NotFound error in the client console (F8).

It’s this one then? https://github.com/TomGrobbe/NativeUI

Yep, should be pretty much the exact same. I have no issues building / compiling it, it’s just FiveM rejects to load it.

The usage of some stuff is different, thats all i know.

Show your dll name along with your resource.lua please

I just cloned that repo and built it along with the example menu.

-Had to update reference for CitizenFX.Core in visual studio
-Had to change the Assembly name in NativeUI properies from NativeUI to NativeUI.net
-Removed the post build line event from Build Events
-Built both the NativeUI and MenuExample
-Copied NativeUI.net.dll and MenuExample.net.dll from the bin\debug folder into resources\NativeUI folder on dev server
-Added __resource.lua file like with these contents

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

client_scripts {"NativeUI.net.dll", "MenuExample.net.dll"}

-refresh in server console
-start NativeUI in server console
-pressing ‘Z’ key in game brought up the ExampleMenu from the project.

1 Like