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

Wine-Mono does not warn/error about running dotnet5+ binaries. #197

Open
Fox2Code opened this issue Jun 30, 2024 · 12 comments
Open

Wine-Mono does not warn/error about running dotnet5+ binaries. #197

Fox2Code opened this issue Jun 30, 2024 · 12 comments

Comments

@Fox2Code
Copy link

According to #15 (comment) dotnet5+ is out of scope of Wine-Mono.

But Wine-Mono does not warn or error out when loading dotnet5 software, a message like this should be enough:

Warning: Wine-Mono detected you are running dotnet5+ software, Wine-Mono only support up to dotnet4.
Warning: Do not report any issues related to this software to Wine or Wine-Mono when running this software with Wine-Mono.
Warning: Please install Microsoft dotnet5+ to run dotnet5+ software.

This is very important to make it clear Wine-Mono does not support dotnet5+

@Fox2Code
Copy link
Author

Example of dotnet5+ software: https://www.minecraft.net/en-us/download

@madewokherd
Copy link
Owner

In reply to #196 (comment)

There have been many issues caused by shipped libraries that reference things that don't exist, where .NET Framework detects they are unused and doesn't care, while Mono fails to detect this. My guess in this case is that the whole "Windows.Foundation.UniversalApiContract" library is unused by the Minecraft installer, and Mono doesn't detect this.

@madewokherd
Copy link
Owner

Another possibility: .NET Framework may have special handling of winmd-type dll's that ignores the actual code (and references) inside the dll.

@madewokherd
Copy link
Owner

From my own testing (based on modules loaded in the process on Windows), I know the Minecraft installer runs in .NET Framework. There's no "wrong detection" and no chance of that as the way Framework and Core load is completely different. .NET Core projects include an unmanaged executable that loads the .NET Core runtime (see for example the .NET 8 builds at https://github.com/madewokherd/xalia/releases/tag/xalia-0.4.2). .NET Framework executables instead reference mscoree which loads Wine Mono.

I don't know how you could get a .NET Core project to load in Wine Mono even if you wanted to.

@Fox2Code
Copy link
Author

Fox2Code commented Jul 2, 2024

Well, it's dotnet4 but expect dotnet5 stuff

@Fox2Code
Copy link
Author

Fox2Code commented Jul 2, 2024

I'm trying to think about this and it doesn't make a lot of sense, maybe bundling dotnet core with wine-mono for the GAC libraries and UWP apps could help?

Like I'm thinking Wine-Mono is installed by default on Wine, and since dotnet core is opensource, I don't think this would be an issue to bundle it in some way...

@madewokherd
Copy link
Owner

We wouldn't be able to run the libraries in Mono.

@Fox2Code
Copy link
Author

Fox2Code commented Jul 5, 2024

You said #151 was dotnet5+ the dlls says they are dotnet5+ but loaded fine by Wine-Mono, and fails when executed at some point.

Does that means #151 is a dotnet4 API marked as dotnet5 on the wiki?

Something is definitely wrong here.

@madewokherd
Copy link
Owner

There's no check upon loading a dll that the APIs it references are valid.

@Fox2Code
Copy link
Author

You told me Minecraft Installer is dotnet4, but Minecraft Installer require both #196 and #151

Either the Minecraft installer is dotnet5+ but still loaded by wine-mono for some reason, or both #196 and #151 are dotnet4 and need to be reopenned.

@madewokherd
Copy link
Owner

I'm not going to continue arguing with you. Feel free to write tests cases for those possibilities. If they succeed then you have your answer.

To me it's not worth the effort. We'll most likely need .winmd support in any case, and when that's done we'll be in a better position to understand the rest of it.

@Fox2Code
Copy link
Author

I think I agree we need more tests and code somewhere else, I'll come back when both winmd files are supported in wine and I have more useful info about the issue.

I'm so sorry for making you spend more time than necessary on this so early while we don't have the necessary info to progress.

Also for everything in Wine-Mono, you don't owe anything to anyone, I'm thankful for everything you have done already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants