Dedicated Server: SpaceEngineersDedicated.exe expects CWD == installation directory, crashes if not
I'm currently walking through the official guide for setting up a Space Engineers dedicated server, and I'm running into some annoying bugs related to working directories.
According to the "quick server setup" section, all that's needed to start SE DS as a service is to run SpaceEngineersDedicated.exe and add a new instance. However, when I did this on my dedicated server VM, I receive a terminating exception:
Full exception info:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.InvalidOperationException: Exception occurred while initializing the installation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Users\Administrator\SpaceEngineersDedicated.exe' or one of its dependencies. The system cannot find the file specified.. at System.Configuration.Install.ManagedInstallerClass.InstallHelper(String[] args) at VRage.Dedicated.Configurator.SelectInstanceForm.addNewInstance_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll ---------------------------------------- SpaceEngineersDedicated Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/SpaceEngineersDedicated.exe ---------------------------------------- Sandbox.Game Assembly Version: 0.1.1.0 Win32 Version: 0.1.1 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/Sandbox.Game.DLL ---------------------------------------- netstandard Assembly Version: 2.0.0.0 Win32 Version: 4.6.26011.1 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/netstandard.DLL ---------------------------------------- VRage.Library Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Library.DLL ---------------------------------------- SpaceEngineers.Game Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/SpaceEngineers.Game.DLL ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- VRage.Math Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Math.DLL ---------------------------------------- VRage Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.DLL ---------------------------------------- VRage.Render Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Render.DLL ---------------------------------------- VRage.Game Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Game.DLL ---------------------------------------- VRage.Dedicated Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Dedicated.DLL ---------------------------------------- Sandbox.Graphics Assembly Version: 0.1.1.0 Win32 Version: 0.1.1 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/Sandbox.Graphics.DLL ---------------------------------------- VRage.Input Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Input.DLL ---------------------------------------- System.Collections.Immutable Assembly Version: 1.2.3.0 Win32 Version: 4.6.26515.06 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/System.Collections.Immutable.DLL ---------------------------------------- System.ValueTuple Assembly Version: 4.0.2.0 Win32 Version: 4.6.26011.01 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/System.ValueTuple.DLL ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- VRage.Platform.Windows Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Platform.Windows.DLL ---------------------------------------- System.Memory Assembly Version: 4.0.1.0 Win32 Version: 4.6.27129.04 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/System.Memory.DLL ---------------------------------------- HavokWrapper Assembly Version: 0.1.1.0 Win32 Version: 0.1.1 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/HavokWrapper.DLL ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- VRage.Game.XmlSerializers Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Game.XmlSerializers.DLL ---------------------------------------- ProtoBuf.Net.Core Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/ProtoBuf.Net.Core.DLL ---------------------------------------- VRage.Network Assembly Version: 1.0.53.0 Win32 Version: 1.0.53.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Network.DLL ---------------------------------------- System.ComponentModel.Annotations Assembly Version: 4.2.1.0 Win32 Version: 4.6.26515.06 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/System.ComponentModel.Annotations.DLL ---------------------------------------- System.ComponentModel.DataAnnotations Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll ---------------------------------------- Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- VRage.Scripting Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Scripting.DLL ---------------------------------------- SharpDX.DXGI Assembly Version: 4.2.0.0 Win32 Version: 4.2.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/SharpDX.DXGI.DLL ---------------------------------------- System.Runtime Assembly Version: 4.1.2.0 Win32 Version: 4.6.25714.01 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/System.Runtime.DLL ---------------------------------------- SharpDX Assembly Version: 4.2.0.0 Win32 Version: 4.2.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/SharpDX.DLL ---------------------------------------- RestSharp Assembly Version: 106.6.10.0 Win32 Version: 106.6.10.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/RestSharp.DLL ---------------------------------------- Anonymously Hosted DynamicMethods Assembly Assembly Version: 0.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll ---------------------------------------- VRage.Ansel Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.Ansel.DLL ---------------------------------------- ProtoBuf.Net Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/ProtoBuf.Net.DLL ---------------------------------------- System.Reflection.Emit.Lightweight Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Reflection.Emit.Lightweight/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Reflection.Emit.Lightweight.dll ---------------------------------------- System.Reflection.Emit.ILGeneration Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Reflection.Emit.ILGeneration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Reflection.Emit.ILGeneration.dll ---------------------------------------- System.Management Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll ---------------------------------------- System.ServiceProcess Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceProcess/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll ---------------------------------------- SpaceEngineers.ObjectBuilders Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/SpaceEngineers.ObjectBuilders.DLL ---------------------------------------- Sandbox.Common Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/Sandbox.Common.DLL ---------------------------------------- EmptyKeys.UserInterface Assembly Version: 3.2.0.0 Win32 Version: 3.2.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/EmptyKeys.UserInterface.DLL ---------------------------------------- EmptyKeys.UserInterface.Core Assembly Version: 3.2.0.0 Win32 Version: 3.2.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/EmptyKeys.UserInterface.Core.DLL ---------------------------------------- Sandbox.RenderDirect Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/Sandbox.RenderDirect.DLL ---------------------------------------- VRage.NativeWrapper Assembly Version: 0.1.1.0 Win32 Version: 0.1.1 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/VRage.NativeWrapper.DLL ---------------------------------------- SpaceEngineers.ObjectBuilders.XmlSerializers Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/SpaceEngineers.ObjectBuilders.XmlSerializers.DLL ---------------------------------------- Sandbox.Game.XmlSerializers Assembly Version: 0.1.1.0 Win32 Version: 0.1.1.0 CodeBase: file:///E:/SpaceEngineers/Server/DedicatedServer64/Sandbox.Game.XmlSerializers.DLL ---------------------------------------- System.Configuration.Install Assembly Version: 4.0.0.0 Win32 Version: 4.6.1586.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration.Install/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll ----------------------------------------
After some troubleshooting on my end (and looking at the path that the DS was trying to fetch its own EXE from), it appears that the method in question is expecting SpaceEngineersDedicated.exe to be present under the process's current working directory.
When starting executables by double-clicking on them in Windows Explorer, the CWD is generally the same directory that the executable resides in. However, this should not be relied upon: starting EXEs via Command Prompt/PowerShell/other methods mean the working directory may be set to any location on-disk. Because I started SpaceEngineersDedicated.exe from a PowerShell terminal, the CWD defaults to the root of my home directory.
More frustrating is that the official guide doesn't mention SpaceEngineersDedicated.exe must be started from the same working directory that the executable resides in.
Could someone from Keen either update the dedicated server guide to mention SpaceEngineersDedicated.exe must be run out of the same directory it resides in, or update this method to use the directory path of the EXE itself instead of the current working directory?
Hello, Engineer,
thanks for letting us know about this issue that you are experiencing. The issue has been reported into our internal system.
Kind Regards
Keen Software House: QA Department
Hello, Engineer,
thanks for letting us know about this issue that you are experiencing. The issue has been reported into our internal system.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!