I’m trying to run a built network-server on Windows Server Core 2019.
Both Mono and IL2CPP builds silently fails when starting them, even though they work fine on my local computer. Powershells $LASTEXITCODE gives -1073741515, which seems really weird.
I’m running it through powershell remoting, just staring the exe normally.
I have also tried with -nolog -batchmode and -nographics.
Unity 2019.3.7.
I would have at least expected some sort of error.
You could also enable loader snaps by running “gflags -i <exe_name> +sls” (gflags comes with Windows SDK - you can just copy that executable to the server) and then try running the process through a debugger. It will tell you which DLL it cannot load.
Sadly the dependency walker was not quite reliable. It shows a bunch of missing stuff on my local machine, despite the app working fine here. The list from the server is different, so it is hard to make a diff.
The output of debugging + gflags is a bit cryptic to me, but i think it is at least opengl32.dll and dwmapi.dll that have problems. Both of those are related to UI, and it makes no sense for a ‘server build’ to require those.
I tried just copying over the opengl32.dll, and the dwmapi.dll was already present (despite it being a no-UI server). No luck. The attached file is with both opengl32.dll and dwmapi.dll present.
Looks like it cannot locate “winmmbase.dll”. It seems like opengl32.dll is there, but it fails to load that because it depends on “glu32.dll” (and that isn’t there). This just sounds like a broken Windows installation… I don’t think there’s much we can do here to support this scenario if OS is missing random system DLLs.
As I wrote in my previous post, I just copied in the opengl32.dll from my local computer in hopes that would solve it. I guess I’ll try copying in the rest you mentioned.
The OS is not missing random dlls, it deliberately has no UI, so no graphics/UI related dlls are present. With the exception of those I copy in.
It is still weird to me that a ‘server build’ unity player requires all these UI libraries.
Edit: Holy shit, I got it to work. Here is a list of dlls I copied from my standard Win10 to the Server Core:
opengl32.dll
glu32.dll
winmmbase.dll
vcruntime140.dll
vcruntime140_1.dll
I also installed some old directx via commandline, but I’m not sure if it mattered in the end.
Thanks for the help.
Edit: Actually something very strange:
When i set the timezone on the windows server core installation to something other than “UTC” (which seems to be the default) using tzutil /s attempting to start the unity player or server fails immediately only briefly changing the cursor to a busy / hourglass icon.