Jump to content

Server mod development for .Net 6.0


Recommended Posts

Posted

Hello everyone, there was a need to write a mod for the .Net 6.0 platform. There is absolutely no information about this on the Internet, since everyone writes under the 3.1 version. Also, many members of the forum write that it is possible to run the server on the version I need.

In my case, I installed EF Core, and this package uses some types and dependencies that the server does not see. The only thing I googled:

https://stackoverflow.com/questions/13748055/could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as

Server Console:

[INFO] Loading NodeJS packages...
[INFO] Starting packages...
[DONE] Server packages have been started.
Initializing Bootstrapper.dll (1.1.0.0)..
-> SERVER STARTED AT 14.06.2022 14:18:33
Unable to load acl.xml
ACLEnabled: False
Loaded 667 entries from vehicleData.json
Loading resources..
-> Starting testmode resource..
testmode: loading scripts.. found 3 script(s)
Unable to load one or more of the requested types.
Could not load type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Could not load type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
-> Error starting testmode due to missing assemblies.

Exception message: Unable to load one or more of the requested types.
Could not load type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Could not load type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Started! Waiting for connections..
[DONE] Started resource transfer server at 22006 port.
[DONE] Client-side packages weight: 0.000000 MB (uncompressed: 0.000000 MB).
[INFO] Initializing networking...
[DONE] Networking has been started: (IPv4-only) at 127.0.0.1:22005
[DONE] The server is ready to accept connections.

I would be grateful for any information about this!

  • 9 months later...
Posted
On 3/19/2023 at 1:37 PM, melonsound said:

Rage mp library doesnt support asyncronous methods i guess

Async is supported.

On 6/14/2022 at 12:20 PM, Ku4eR99 said:

I would be grateful for any information about this!

You can use .NET 6 if you replace the dotnet runtimes on the server with the .NET 6 ones (just make sure you only overwrite .dll files, not the json files).
See: https://dotnet.microsoft.com/en-us/download/dotnet/6.0 -> .NET Runtime 6.0.15

You cannot do this with the client-side, however, so you will need to stick to 3.1 there.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...