Open BuddiesTV opened 8 months ago
Are you using the same libraries on both platforms?
It's odd as we don't offer assembly netstandard
. Neither should System.Lazy2
be in there, are you sure it's not System.Lazy`2
? if so then it should target either mscorlib or System.Runtime
(type forward).
Edit: looking in client and both server files, System.Lazy`2
which should be in System.ComponentModel.Composition.dll
seems to be absent completely.
Are you using the same libraries on both platforms?
Yes
It's odd as we don't offer assembly
netstandard
. Neither shouldSystem.Lazy2
be in there, are you sure it's notSystem.Lazy`2
? if so then it should target ~either mscorlib or~System.Runtime
(type forward).
Yeah sorry, I meant System.Lazy`2
but because of formatting the ` got lost
Edit: looking in client and both server files,
System.Lazy`2
which should be inSystem.ComponentModel.Composition.dll
seems to be absent completely.
Yeah, the FXServer for windows ships with System.ComponentModel.Composition.dll, but the file is missing on linux
Yeah, the FXServer for windows ships with System.ComponentModel.Composition.dll, but the file is missing on linux
Just double checked this, Windows also doesn't come with it, did you add it yourself? https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
Just double checked this, Windows also doesn't come with it, did you add it yourself?
No I haven't added that, you need to look into the Facades
Directory, the dll is in there citizen\clr2\lib\mono\4.5\Facades
Ah good find! Seems like I have some things to find out. Can you change this issue into a request for these files to be added to Linux (with the issue still explained) instead? (it will apply to both mono environments, so v1 can be removed)
Ah good find! Seems like I have some things to find out. Can you change this issue into a request for these files to be added to Linux (with the issue still explained) instead? (it will apply to both mono environments, so v1 can be removed)
Done, thanks for your time so far 👍
System.ComponentModel.Composition.dll
is missing on Linux builds of the FXServer(should be here:citizen\clr2\lib\mono\4.5\Facades
), which is why this following error occurs, would be good to have them added, so this issue is resolved.Bug: I'm encountering an issue when using the Autofac's
ContainerBuilder.build()
function on a server-side application. The function works as expected on Windows, but throws an exception when run on Linux.The exception thrown is
System.TypeLoadException: Could not resolve type with token 0100009f from typeref (expected class 'System.Lazy`2' in assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51')
Here are the classes where the issue is reproducible:
ServerClass.cs:
ContainerHelper.cs: