-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor can't find .NET when installed from the official Ubuntu feeds #70510
Comments
Are you able to execute The
|
Heya, thanks for the questions. I'll explain a little more too, this is only my second time filing a GitHub issue and I'm not sure how descriptive or terse I should be! My semi-educated guess is the root of all this is Ubuntu is putting the .Net 6 SDK in that spot which is different from Microsoft, and from your questions, sounds like the Ubuntu one is leaving setup half-done? I have nothing for I installed the .Net 6 SDK directly from apt (aka no snap package) but I found this on Microsoft's docs which is helpful: They're recognized people/apps look for dotnet all over the place (figuratively) and say it's okay to symlink to the spot where the program is looking - they specifically call out the share location
Sorry about the wall of text, with all this said I'm not sure if the best solution is for me to
Nothing is set for the env var $DOTNET_ROOT
|
That's fine, they don't need to exist, just checking if they did because they affect the lookup. I don't think we want to recommend users to add symlinks or modify their installation, I think the Ubuntu package should work fine out of the box. This could just be a bug with our hostfxr resolver. The hostfxr resolver already uses |
Ok cool, thanks for being so helpful! All of that makes sense and I think making Ubuntu's default installation of the dotnet SDK work out of the box is great. I was surprised seeing
|
Are you getting any other errors in the terminal? Otherwise, are you able to create and build a C# Godot project? I suspect this error may not actually be an issue. I think this error is printed because it can't find the SDK in the usual locations but it will try to find it relative to the dotnet executable. If it's able to find it everything should be fine and the error can be ignored; otherwise, it should print the same error again but with a different path and then a third error that looks like this:
|
You know what, there no other errors in the terminal and I can definitely build and run a C# project. The one thing which is confusing me is I still see mono in some places in the build log but we're definitely using msbuild, which (I'm really certain) is only a .Net thing. Thanks for having me check this, as far as I can tell everything works. Should I make a PR to improve how the hostfxr resolver deals with the Ubuntu package, or take a look a why the error is output to the terminal and suppress it in this case? Maybe we're all good because everything works?
|
Without seeing the log you are referring to I'm unable to provide an accurate explanation but I'd say this is expected since we still refer to the module as the mono module in a lot of places.
I think this may change with the Editor unification1, since non-C# users will use the same Editor complaining about not finding .NET won't be acceptable and we'll have to change how we handle that. Since this may end up fixed as a side-effect of Editor unification, I feel like trying to fix the current code may not be worth doing at the moment. So if everything's working for you I think we can leave it as is for now if you're OK with the false-positive error. Footnotes
|
So i write this here because i always run in to this error when i distro hopping and forget about the solution for me :P
then i modify the prefrerences:
With content:
and
With content:
and then i run:
sources here:
|
Running Godot from the terminal solved my problem |
Try this: wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod 777 dotnet-install.sh
./dotnet-install.sh --channel 7.0
export PATH="$PATH:$HOME/.dotnet"
Snap dotnet has issue, it seems like: #76422 |
Where is the tracker for this? |
See godotengine/godot-proposals#2333. There's no open proposal for actually implementing this, but it's not planned for 4.1 at least. |
solved for me |
@kepiz This was fixed 4 days ago, the fix is not available in the version of Godot you're using (I assume 4.1.1-stable). You'll find the fix in the upcoming 4.2-dev5, and likely in 4.1.2 when it's released. |
How do I get past this for the moment? I've installed dotnet-sdk from snap and using godot4-mono from snap. |
What error do you have exactly? |
I know saying do something different isn't as satisfying as solving the problem you're directly having but I think in this case if you're using a modern version of Ubuntu that's the easier solution for you. (I'm guessing you're using modern Ubuntu because snap) Have you read the earlier parts of the issue I posed, especially the part about installing dotnet different ways? [1] https://learn.microsoft.com/en-us/dotnet/core/install/linux#troubles-resolving-dotnet The easiest is symlink from the location of your Going back to there is a simpler way, I install the dotnet sdk via apt and install Godot to either I personally think doing this is the best because you've got a pretty standard version of .Net installed and you are free to update or change the Godot editor at your own pace and there are no sandboxing/snap issues to debug. |
I've tried symlinking /dotnet with the installed dotnet directory. And that didn't work. In ubuntu the dotnet files are in a snap created filesystem if using snap. |
Godot version
4.0.beta10.mono.official.d0398f62f
System information
Ubuntu 22.10 with dotnet 6
Issue description
If you are using Ubuntu 22.10, maybe other version, and you install .Net 6.0 from the official Ubuntu feeds, Godot 4 can't find the .Net package's install location and therefore can't find
/usr/share/dotnet/host/fxr
.This is because the Ubuntu feeds put the dotnet directory at
usr/lib/dotnet
and if you install the package directly from the Microsoft official feeds the package is atusr/share/dotnet
When launching Godot 4, the error message is:
"The host fxr folder does not exist: /usr/share/dotnet/host/fxr"
Steps to reproduce
/opt/godot
- this mean the Godot executable is at/opt/godot4/Godot_v4.0-beta10_mono_linux.x86_64
sudo apt install dotnet-sdk-6.0
/opt/godot4/Godot_v4.0-beta10_mono_linux.x86_64
Error message
Minimal reproduction project
This is during the program launch, I'm happy to attach logs if that will help. I don't think a repro project helps here.
The text was updated successfully, but these errors were encountered: