Jump to content

"Could not load file or assembly System.Runtime" when trying to load a world with a freshly created Core Mod (Linux)


Go to solution Solved by The Insanity God,

Recommended Posts

Posted

Game Version: 1.12.6 | OS: Arch Linux [6.19.8.1] | IDE: Visual Studio Code [1.109.5-1]

Heya there folks. Been a real hecking fight trying to get modding to work on Linux. I'm almost there, just been absolutely STUMPED on this one pert here.
Been following the guides over on the wiki and all has worked perfectly fine: Setting a environment variable to the correct VS folder, getting the template(s) installed into VS Code, and getting the debugging to work. All that is fine and has no issues at all, works flawlessly.

However, there seems to be something terribly wrong with either the game or build system, as for some reason it can't find the correct assemblies or files to run when the world loads, despite me checking that NET is installed correctly and all the file paths I know NET dumps to and finding everything in place where it should be. This is on a completely empty and fresh Code mod too, nothing even edited yet.
image.thumb.png.6ee01ffad058329862c40dbdd096eb5d.png
Interesting to note as well that in VSCode, when the setting "justMyCode" is set to false in the launch.json, the log in VSCode spits out a bunch of extra warnings about being unable to find or run the files, despite them clearly being there and having the right permissions to run (verified using ls -l and chown to make sure).
image.thumb.png.9edcd4afe28cddd499fc23566b7073e9.png
I also noticed that the error noted the System.Runtime as version 10.0.0, but the files it seems to be searching through are version 8.0.25. It also only properly loads the files that are bundled with the game.

Is it possible I somewhere along the way messed up a path, or am missing a package or setting? Something seems to be having some kind of misconfiguration one way or another I feel like. Any help would be appreciated, thanks!

  • Solution
Posted
On 3/16/2026 at 5:05 AM, Hexzatite said:

Game Version: 1.12.6

You sure you didn't mean 1.21.6 (Considering its loading .NET8 assemblies)?

 

On 3/16/2026 at 5:05 AM, Hexzatite said:

However, there seems to be something terribly wrong with either the game or build system, as for some reason it can't find the correct assemblies or files to run when the world loads, despite me checking that NET is installed correctly and all the file paths I know NET dumps to and finding everything in place where it should be. This is on a completely empty and fresh Code mod too, nothing even edited yet.

The error you are showing suggests that it's attempting to load a newer version of .NET then the game version supports. (It's the game loading the mod DLL's, so the game needs a higher or equal version then the mods .NET version)

Would recommend checking your Target Framework in the csproj file, should look as following:

<TargetFramework>net8.0</TargetFramework>

(if it has net10.0 there, then that would be your issue)

 

Posted

Yep that seems to have been the issue. Super odd it's trying to target net10 rather then net8 by default... I seriously wonder why that is. Anyone have any ideas? Regardless a quite easy fix then, thanks for the help!

Posted (edited)

.net10 is for VS 1.22 mods.

In my opinion, the default should target the stable version of the game (therefore the target framework should be .net8), not unstable one, but it seems the dev decided otherwise.

P.S.
If you don't plan to create 1.22 mods for a while, installing the previous version of the template should help:

dotnet new install VintageStory.Mod.BasicTemplate::0.2.1

With this version, the target frameworks is set to .net8, so there's no need to fix it manually every time you make a project

Edited by Spoonail
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.