For some reason the script does not run. I don’t see “Hi from MonoTest.Client!” or “Hi from MonoTest.Server!” in the client and server console respectively. And the command and tick also don’t work. I tried changing the namespace to the ones used by the template, but that did not change anything.
I think I set up the fxmanifest correctly. I specified the client and server dll directly since these were selected with *.net.dll in the template (since .net is no longer included and otherwise it would match the other dlls). And I also changed the build script to look for the net452 folder as used by the mono_v2 getting started repository.
I’m new to C# and dotnet, so I’m not sure what could be going wrong here. Does anyone have any idea?
I couldn’t find anything about mono v2 actually expiring on 2023-06-30. I’m assuming it still works since the dlls are still included with the client and server artifacts. If not, please let me know as it would make sense that it’s not running.
That was it, thanks a lot! I looked it up in the docs as well and it only runs scripts ending with .net.dll. Found it here if anyone comes across this in the future: Resource manifest - Cfx.re Docs
Some further questions though. I see that you’re targeting net6.0. I thought fivem does not support anything higher than 4.8 due to the sandboxing issues (and net452 being the actual supported version). Do you do something special to make it work or was support for higher dotnet versions added?
And do you happen to know how the official template made it so that the client and server dlls produce .net.dll files without having the project files be named .net.csproj?
That is due to my mistake, but if I’m not mistaken it works even if it is pointing to net6.0, I don’t know much about the issue of versions so I couldn’t clarify this for you.
You do not need to change the name of the .csproj file, in visual studio when you open the project properties and in the application section you will see that you can change the assembly name.
And changing my target version to net6.0 does indeed seem to work, which is rather interesting since there are a lot of posts here on the forum that say it’s impossible to support it. Setting it to net8.0 works as well. Maybe it works due to my code not using anything from net 6.0? Not sure how that works under the hood.