The Gravyzone

This is where I regularly irregularly post about game dev and tangental subjects

Home

Trouble with godot

Jan. 17, 2026 | Categories: Misc

After completing a few tutorials in MonoGame (and really liking it) I decided to try out the C# version of Godot 4 because I want to make my final decision on an engine/framework as my next step. I didn’t think it would be such a head ache as MonoGame and Godot can both work in .NET8 (as of now Godot doesn’t technically support it, and MonoGame JUST got full support).

I went ahead and deleted all the old .net sdks/runtimes/etc. I then tried to install .NET8 and things ‘seemed’ to go ok with the manual install. Until C# in general wasn’t working in my Visual Studio Code (.deb package) and trying to run Godot 4 (.NET support version) gave this error:

“Unable to load .NET runtime, specifically hostfxr.
Attempting to create/edit a project will lead to a crash.

Please install the .NET SDK 6.0 or later from https://dotnet.microsoft.com/en-us/download and restart Godot.“

Well it turns out even though running ‘dotnet –info’ showed me everything installed fine, plus I also had the PATH variable correct, it wasn’t fine. What the hell?

Many old/new forum posts did I travel through that mentioned my error but didn’t give satisfactory answers. Until I finally came across this page in Microsoft help center about .NET stuff. https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#register-the-microsoft-package-repository

Basically, just run the following commands:
# Get Ubuntu version

declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP ‘(?<=^VERSION_ID=).+’ /etc/os-release | tr -d ‘”‘; fi)
# Download Microsoft signing key and repository

wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
# Install Microsoft signing key and repository

sudo dpkg -i packages-microsoft-prod.deb
# Clean up

rm packages-microsoft-prod.deb
# Update packages

sudo apt update

This more or less is signing the microsoft packages of .net. After this, I ran:

sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-8.0

Only THEN was I able to open the .net Godot, and only THEN was I able to create a quick ‘Hello World’ script successfully. Also, be sure you’re not double dipping on your .NET packages! Only have them from a SINGLE SOURCE. I mean don’t have Ubuntu’s crap, and Microshit’s crap both installed at the same time. That causes nothing but problems.