Skip to content
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

[Enhancement]: Issues running Windows game on Linux with dotnet installed on Linux #740

Open
samr7 opened this issue Sep 10, 2024 · 3 comments
Labels
Bug / Issue Something isn't working Work-in-Progress This issue or pull request is being worked on currently

Comments

@samr7
Copy link

samr7 commented Sep 10, 2024

Describe the new feature or enhancement

I followed the instructions for how to install MelonLoader v0.6.4 for a Windows game running under Steam Proton on Linux.

I had some problems, and would like to share my solution.

The main problem is that it failed to load hostfxr:

[ERROR] il2cpp_init detour failed: Failed to load hostfxr. Please make sure you have installed the .NET 6.0 runtime.

I definitely had the dotnetdesktop6 package installed per the instructions.

It turned out that it was failing because the Linux dotnet SDK was installed on the host, and it configures a system-wide environment variable, DOTNET_ROOT. This environment variable was being passed into the Proton Windows environment. The Windows dotnet host tool also uses this environment variable, and having it set, especially to a Linux host path, prevented it from finding its runtime.

In Steam, this environment variable can be cleared by setting launch options for the game:

DOTNET_ROOT= %command%

I don't think this should be fixed/enhanced in MelonLoader itself, but maybe it would help somebody else if it got into the instructions.

@HerpDerpinstine HerpDerpinstine added Bug / Issue Something isn't working Work-in-Progress This issue or pull request is being worked on currently labels Sep 15, 2024
@ZanDev32
Copy link

ZanDev32 commented Nov 17, 2024

@samr7 Can you make a short step by step how to set the environment variable on Lutris or just using winetricks?

@samr7
Copy link
Author

samr7 commented Nov 17, 2024

@ZanDev32 Are you also noticing this problem?
I am unfamiliar with Lutris.
I also don't know of a good way to do this using Wine built-in mechanisms or winetricks. It's possible to set environment variables in user.reg, but setting one to an empty string does not have the effect of removing or masking an existing environment variable.

@KibblesTheKitten
Copy link

Simply run the dotnet installer in wine tricks. Make sure you are using the x64 desktop runtime executable! And also add the version library in wine cfg under the libraries page in wine tricks to the prefix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug / Issue Something isn't working Work-in-Progress This issue or pull request is being worked on currently
Projects
None yet
Development

No branches or pull requests

4 participants