Can't launch Stardew from Steam with Mods after installing SMAPI on Linux

NightBlade

Farmhand
I'm on Linux (Manjaro, derived from Arch Linux) and Plasma for the UI. When I install Stardew Valley via Steam, and run it, it works. When I install SMAPI, it says "launch the game the way you normally would in Steam," which I did, but it launches without modding.

So, I browsed to the Stardew directory, and ran StardewModdingAPI (the executable). I get this error:

A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/usr/share/dotnet'.
Failed to run as a self-contained app.
- The application was run as a self-contained app because '/home/nb/.local/share/Steam/steamapps/common/Stardew Valley/StardewModdingAPI.runti
meconfig.json' did not specify a framework.
- If this should be a framework-dependent app, specify the appropriate framework in '/home/nb/.local/share/Steam/steamapps/common/Stardew Vall
ey/StardewModdingAPI.runtimeconfig.json'.

I checked the StardewModdingAPI.runtimeconfig.json. It matches the Stardew Valley.exe runtime config, namely:

{
"runtimeOptions": {
"tfm": "net5.0",
"includedFrameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "5.0.0",
"rollForward": "latestMinor"
}
],
"configProperties": {
// disable tiered runtime JIT: https://github.com/dotnet/runtime/blob/main/docs/design/features/tiered-compilation.md
// This is disabled by the base game, and causes issues with Harmony patches.
"System.Runtime.TieredCompilation": false
}
}
}

I don't understand how the main executable launches fine, but SMAPI doesn't.

I did some googling, and found this post: https://stackoverflow.com/questions/67974659/c-compiling-and-runtimeconfig

Which suggested replacing the "includedFrameworks" section with this:

"framework": {
"name": "Microsoft.AspNetCore.App",
"version": "5.0.0"
},

I specified version 5.0.7, which seems to work (sort of); as does using .NET 6 or .NET 7 (by changing this section, and the "tfm" attribute higher up in the file).

However, launching ./StardewModdingAPI now runs the game with no sound (there's a NoAudioHardwareFound exception or something to that effect).

I can confirm that the main game executable still runs fine, with audio.

Any ideas? Is this an SMAPI bug?

I've tried the usual (uninstall/reinstall the game, run the game in compatibility mode, uninstall/reinstall SMAPI, etc.) many, many, many times.
 

NightBlade

Farmhand
Turns out installing `xterm` fixed it. Yay!

To be clear, this is running the game without Proton / compatibility in Steam.
 
Top