Oxide extension throwing error even on freshNot An Issue

As of yesterday morning, the server was throwing errors when restarting. I tried debugging, but no luck, so I backed up the server and tried a completely fresh vanilla install, but I still got errors.

Steps with fresh vanilla install:

1) Open CMD and execute following command (modified to remove sensitive info):

"C:\PATH\SteamCMD\steamcmd\steamcmd.exe" +login anonymous +force_install_dir "C:\SERVERPATH" +app_update 258550 validate +quit

2) Download Oxide extension from this site at https://umod.org/games/rust and extract to C:\SERVERPATH

3) Execute startup script (modified to remove sensitive info):

@echo off
rem Start server up. If server restarts/quit command is used/crashes, this batch file will be run from the beginning automatically
cd "SERVERPATH"
RustDedicated.exe -batchmode ^
+server.ip IP ^
+server.port 28015 ^
+server.tickrate 30 ^
+server.hostname "SERVERNAME" ^
+server.identity "IDENTITY" ^
+server.maxplayers 100 ^
+server.saveinterval 1800 ^
+rcon.web 1 ^
+rcon.ip IP ^
+rcon.port 28017 ^
+rcon.password "PASSWORD" ^
+server.headerimage "IMAGEURL" ^
+server.url "URL" ^
+server.tags monthly,pve,roleplay ^
+server.description "DESCRIPTION" ^
-logfile "C:\LOGDIRECTORY\server.log" ^
-silent-crashes ^
+server.level "Procedural Map" ^
+server.seed 1278840779 ^
+server.worldsize 5000 ^
+backup ^
+server.secure true ^
-cheatpunch ^
+server.radiation false ^
+hotairballoon.population 0 ^
+modularcar.population 0 ^
+scraptransporthelicopter.population 0 ^
+minicopter.population 0

4) Error thrown during startup:

Loaded plugin Rust v2.0.5276 by Oxide Team and Contributors 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Loaded plugin Unity v2.0.3772 by Oxide Team and Contributors 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Asset Warmup (1/8871)
BadImageFormatException: Could not resolve field token 0x040047d6, due to: Could not load file or assembly 'ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none> assembly:C:\ORGC\RustyGaming\RustyGamingPvE\RustDedicated_Data\Managed\Assembly-CSharp.dll type:AiManager member:(null) signature:<none>
  at PrefabPreProcess.ProcessObject (System.String name, UnityEngine.GameObject go, System.Boolean resetLocalTransform) [0x001bc] in <9357151e9e52423d80616f588927d318>:0 
  at PrefabPreProcess.Process (System.String name, UnityEngine.GameObject go) [0x0003a] in <9357151e9e52423d80616f588927d318>:0 
  at GameManager.FindPrefab (System.String strPrefab) [0x0002a] in <9357151e9e52423d80616f588927d318>:0 
  at FileSystem_Warmup.PrefabWarmup (System.String path) [0x00000] in <9357151e9e52423d80616f588927d318>:0 
  at FileSystem_Warmup+<Run>d__4.MoveNext () [0x00100] in <9357151e9e52423d80616f588927d318>:0 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <c8dc2b468d1841099baa4dd8a110cc44>:0 

Your "vanilla" base install is using the staging branch. This is not an Oxide issue, rather a Steam issue where it supplies the wrong version. Installing Oxide on top of it triggers the error because you are mixing Rust versions as a result, being as Oxide is only released for the public/release branch of the game. You can fix this by specifying the "public" branch and making sure you use the -validate option with SteamCMD.

Go0ePa8S2poB3OZ.jpg Wulf

Your "vanilla" base install is using the staging branch. This is not an Oxide issue, rather a Steam issue where it supplies the wrong version. Installing Oxide on top of it triggers the error because you are mixing Rust versions as a result, being as Oxide is only released for the public/release branch of the game. You can fix this by specifying the "public" branch and making sure you use the -validate option with SteamCMD.

Thank you for the quick reply! How do I specify the public branch? I thought that was the default

"C:\PATH\SteamCMD\steamcmd\steamcmd.exe" +login anonymous +force_install_dir "C:\SERVERPATH" +app_update 258550 validate +quit
"C:\PATH\SteamCMD\steamcmd\steamcmd.exe" +login anonymous +force_install_dir "C:\SERVERPATH" -beta public +app_update 258550 validate +quit

I spun the server up from scratch again using the modified steamexe command and my startup script and it started up fine

I then downloaded the Umod and Discord extensions from this site as well as the RustEdit and RustIO from their respective sites

I extracted the Umod zip and copy pasted the files under Managed into the RustDedicated_Data folder, and copy pasted the other dll files into the Managed folder then started the server back up

It is now skipping the "Load Extension" step and is hopping right into Asset Warmup.

If you see no indication of Oxide being installed, then Oxide isn't installed. Make sure you aren't running steamcmd after installing it.

First off, I realize this is getting quite into the weeds so I appreciate your time and help so far :)

So the following is the startup script that worked for a couple months until yesterday morning:

:STEAM
@echo off
rem Get current date and time and store in variable 'timestamp'
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "timestamp=%YYYY%%MM%%DD%%HH%%Min%%Sec%"

rem Backup server log to the server's log directory
echo f | xcopy /y /f "C:\LOGPATH\RustyGamingPvE\server.log" "C:\LOGPATH\RustyGamingPvE\History\server%timestamp%.log"
rem Backup server, oxide, and userdata to the server's backup location
mkdir "C:\BACKUPPATH\RustyGamingPvE\RustyGamingPvE-%timestamp%\"
echo d | xcopy /s/e "C:\SERVERPATH\oxide" "C:\BACKUPPATH\RustyGamingPvE\RustyGamingPvE-%timestamp%\oxide"
echo d | xcopy /s/e "C:\SERVERPATH\server" "C:\BACKUPPATH\RustyGamingPvE\RustyGamingPvE-%timestamp%\server"
echo d | xcopy /s/e "C:\SERVERPATH\userdata" "C:\BACKUPPATH\RustyGamingPvE\RustyGamingPvE-%timestamp%\userdata"
"C:\Program Files\7-Zip\7z.exe" a "C:\BACKUPPATH\RustyGamingPvE\RustyGamingPvE-%timestamp%.zip" "C:\BACKUPPATH\RustyGamingPvE\RustyGamingPvE-%timestamp%\*" -r -sdel
rmdir "C:\BACKUPPATH\RustyGamingPvE\RustyGamingPvE-%timestamp%"

rem Check for Rust updates and run if any updates are found
"C:\PATH\SteamCMD\steamcmd\steamcmd.exe" +login anonymous +force_install_dir "C:\SERVERPATH" -beta public +app_update 258550 validate +quit
goto OXIDE

:OXIDE
@echo off

for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set y=%%k
for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set t=%%i%%j
set t=%t%_
if "%t:~3,1%"=="_" set t=0%t%
set t=%t:~0,4%
set "theFilename=%d%%t%"
echo %theFilename%

"C:\Program Files (x86)\GnuWin32\bin\wget.exe" --no-check-certificate https://umod.org/games/rust/download?tag=public --output-document "C:\STAGINGFOLDER\OxideDownload\Oxide.Rust.zip"

"C:\Program Files\7-Zip\7z.exe" x "C:\STAGINGFOLDER\OxideDownload\Oxide.Rust.zip" -o"C:\SERVERPATH" -aoa
del "C:\STAGINGFOLDER\OxideDownload\Oxide.Rust.zip"
goto REDIT

:REDIT
@echo off

rem Download and install the latest version of RustEdit

rem for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set y=%%k
rem for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
rem for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set t=%%i%%j
rem set t=%t%_
rem if "%t:~3,1%"=="_" set t=0%t%
rem set t=%t:~0,4%
rem set "theFilename=%d%%t%"
rem echo %theFilename%

"C:\Program Files (x86)\GnuWin32\bin\wget.exe"  -O "C:\SERVERPATH\RustDedicated_Data\Managed\Oxide.Ext.RustEdit.dll" "https://github.com/k1lly0u/Oxide.Ext.RustEdit/blob/master/Oxide.Ext.RustEdit.dll?raw=true"
del "C:\SERVERPATH\Oxide.Ext.RustEdit*.*"
del "C:\SERVERPATH\latest*.*"
goto RUSTIO

:RUSTIO
@echo off

rem Download and install the latest version of Rust.IO
rem for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set y=%%k
rem for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
rem for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set t=%%i%%j
rem set t=%t%_
rem if "%t:~3,1%"=="_" set t=0%t%
rem set t=%t:~0,4%
rem set "theFilename=%d%%t%"
rem echo %theFilename%
"C:\Program Files (x86)\GnuWin32\bin\wget.exe"  -O "C:\SERVERPATH\RustDedicated_Data\Managed\Oxide.Ext.RustIO.dll" "http://playrust.io/latest"
goto RDISC

:RDISC
@echo off

rem Download and install the latest version of the Discord Rust extension
"C:\Program Files (x86)\GnuWin32\bin\wget.exe"  -O "C:\SERVERPATH\RustDedicated_Data\Managed\Oxide.Ext.Discord.dll" "https://umod.org/extensions/discord/download"

goto SERV

:SERV
@echo off
rem Start server up. If server restarts/quit command is used/crashes, this batch file will be run from the beginning automatically
echo ***** Starting Rusty Gaming PvE Up at %date% %time% >> C:\LOGPATH\RustyGamingPvE\RustyGamingPvE-StartupLog%timestamp%.log
cd "C:\SERVERPATH"
RustDedicated.exe -batchmode ^
+server.ip *.*.*.* ^
+server.port 28015 ^
+server.tickrate 30 ^
+server.hostname "HOSTNAME" ^
+server.identity "IDENTITY" ^
+server.maxplayers 100 ^
+server.saveinterval 1800 ^
+rcon.web 1 ^
+rcon.ip IP ^
+rcon.port 28017 ^
+rcon.password "PASSWORD" ^
+server.headerimage "HEADERURL" ^
+server.url "URL" ^
+server.tags monthly,pve,roleplay ^
+server.description "DESCRIPTION" ^
-logfile "C:\LOGPATH\RustyGamingPvE\server.log" ^
-silent-crashes ^
+server.level "Procedural Map" ^
+server.seed 1278840779 ^
+server.worldsize 5000 ^
+backup ^
+server.secure true ^
-cheatpunch ^
+server.radiation false ^
+hotairballoon.population 0 ^
+modularcar.population 0 ^
+scraptransporthelicopter.population 0 ^
+minicopter.population 0>> C:\LOGPATH\RustyGamingPvE\RustyGamingPvE-StartupLog%timestamp%.log 2>&1
echo ***** Rusty Gaming PvE Restarting/Shutting Down/Crashing at %date% %time% >> C:\LOGPATH\RustyGamingPvE\RustyGamingPvE-StartupLog%timestamp%.log
goto STEAM

I am pulling the latest versions of the extensions after i run steamcmd

Okay, and did you verify it actually extracted and replaced files?

All I can suggest is to double-check your install process and verify the patched files were replaced only after the server was updated. If you see nothing about Oxide during loading, then the patched files are not the modified ones Oxide provides.

Go0ePa8S2poB3OZ.jpg Wulf

All I can suggest is to double-check your install process and verify the patched files were replaced only after the server was updated. If you see nothing about Oxide during loading, then the patched files are not the modified ones Oxide provides.

I did a clean install (steamcmd), shut the server down, unzipped the oxide zip and copied the rustdedicated_data folder to the server's root directory

I then ran just the server startup script minus any of the extra stuff (just the rustdedicated.exe and associated startup commands) and i am still getting the following error:

BadImageFormatException: Could not resolve field token 0x040047d6, due to: Could not load file or assembly 'ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none> assembly:C:\ORGC\RustyGaming\RustyGamingPvE\RustDedicated_Data\Managed\Assembly-CSharp.dll type:AiManager member:(null) signature:<none>
  at PrefabPreProcess.ProcessObject (System.String name, UnityEngine.GameObject go, System.Boolean resetLocalTransform) [0x001bc] in <9357151e9e52423d80616f588927d318>:0 
  at PrefabPreProcess.Process (System.String name, UnityEngine.GameObject go) [0x0003a] in <9357151e9e52423d80616f588927d318>:0 
  at GameManager.FindPrefab (System.String strPrefab) [0x0002a] in <9357151e9e52423d80616f588927d318>:0 
  at FileSystem_Warmup.PrefabWarmup (System.String path) [0x00000] in <9357151e9e52423d80616f588927d318>:0 
  at FileSystem_Warmup+<Run>d__4.MoveNext () [0x00100] in <9357151e9e52423d80616f588927d318>:0 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <c8dc2b468d1841099baa4dd8a110cc44>:0 
 
(Filename: <9357151e9e52423d80616f588927d318> Line: 0)

 

You're back to using the staging branch of Rust again. Did you specify the branch?

yes, i used the following:

"C:\STEAMCMDPATH\steamcmd\steamcmd.exe" +login anonymous +force_install_dir "C:\SERVERPATH" -beta public +app_update 258550 validate +quit

I used the main download link for the Umod extension in umod.org..the following is the link from that
https://umod.org/games/rust/download?tag=public

I see I am not the only one thankfully. I'm having the same issue on a test server. Tried a clean install, same issue. Not using staging branch.

BadImageFormatException: Could not resolve field token 0x040047d6, due to: Could not load file or assembly 'ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none> assembly:D:\Servers\branservers\GameServers\TC78746565410862016023573\RustDedicated_Data\Managed\Assembly-CSharp.dll type:AiManager member:(null) signature:<none>
at PrefabPreProcess.ProcessObject (System.String name, UnityEngine.GameObject go, System.Boolean resetLocalTransform) [0x001bc] in <9357151e9e52423d80616f588927d318>:0
at PrefabPreProcess.Process (System.String name, UnityEngine.GameObject go) [0x0003a] in <9357151e9e52423d80616f588927d318>:0
at GameManager.FindPrefab (System.String strPrefab) [0x0002a] in <9357151e9e52423d80616f588927d318>:0
at FileSystem_Warmup.PrefabWarmup (System.String path) [0x00000] in <9357151e9e52423d80616f588927d318>:0
at FileSystem_Warmup+<Run>d__4.MoveNext () [0x00100] in <9357151e9e52423d80616f588927d318>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <c8dc2b468d1841099baa4dd8a110cc44>:0

(Filename: <9357151e9e52423d80616f588927d318> Line: 0)​


Merged post

Update: Tested on another machine and Oxide installed/started fine. I installed the Rust server + Oxide the exact same way on both the test and the 2nd machine.

I copied the 'RustDedicated_Data\Managed' folder from the working machine to the non-working test server and Oxide works after overwriting the Managed folder files.

I did run Rust update each time, maybe something changed with Rust Windows Server?

bran

I see I am not the only one thankfully. I'm having the same issue on a test server. Tried a clean install, same issue. Not using staging branch.

BadImageFormatException: Could not resolve field token 0x040047d6, due to: Could not load file or assembly 'ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:ApexShared, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none> assembly:D:\Servers\branservers\GameServers\TC78746565410862016023573\RustDedicated_Data\Managed\Assembly-CSharp.dll type:AiManager member:(null) signature:<none>
at PrefabPreProcess.ProcessObject (System.String name, UnityEngine.GameObject go, System.Boolean resetLocalTransform) [0x001bc] in <9357151e9e52423d80616f588927d318>:0
at PrefabPreProcess.Process (System.String name, UnityEngine.GameObject go) [0x0003a] in <9357151e9e52423d80616f588927d318>:0
at GameManager.FindPrefab (System.String strPrefab) [0x0002a] in <9357151e9e52423d80616f588927d318>:0
at FileSystem_Warmup.PrefabWarmup (System.String path) [0x00000] in <9357151e9e52423d80616f588927d318>:0
at FileSystem_Warmup+<Run>d__4.MoveNext () [0x00100] in <9357151e9e52423d80616f588927d318>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <c8dc2b468d1841099baa4dd8a110cc44>:0

(Filename: <9357151e9e52423d80616f588927d318> Line: 0)​


Merged post

Update: Tested on another machine and Oxide installed/started fine. I installed the Rust server + Oxide the exact same way on both the test and the 2nd machine.

I copied the 'RustDedicated_Data\Managed' folder from the working machine to the non-working test server and Oxide works after overwriting the Managed folder files.

I did run Rust update each time, maybe something changed with Rust Windows Server?

Those that had this issue somehow got the Rust staging branch from Steam.
Locked automatically