How could WPF .NET Core run in Wine?

Questions about Wine on Linux
Locked
zhcarey
Newbie
Newbie
Posts: 1
Joined: Thu Oct 22, 2020 1:52 am

How could WPF .NET Core run in Wine?

Post by zhcarey »

According to https://ccifra.github.io/PortingWPFApps ... rview.html WPF .NET Core could run in Wine, I tried it but doesn't work.
The EXE could run with no error, but nothing show, I noticed that the WPF loaded OK with many dx... INFO, but when I run my EXE there is nothing about DX show, here is info with DLL load track

Code: Select all

xxx@xxx-virtual-machine:~/dotnet/32$ WINEDEBUG=+loaddll wine CoreWPF.exe 
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\ntdll.dll" at 7BC00000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\kernelbase.dll" at 7B000000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\kernel32.dll" at 7B600000: builtin
0810:trace:loaddll:build_module Loaded L"Z:\\home\\cam\\dotnet\\32\\CoreWPF.exe" at 00400000: native
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\ucrtbase.dll" at 7E880000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\sechost.dll" at 6BC00000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\advapi32.dll" at 61740000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\gdi32.dll" at 7E720000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\rpcrt4.dll" at 62FC0000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\version.dll" at 63480000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\setupapi.dll" at 6BCC0000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\USER32.dll" at 6ED00000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\combase.dll" at 68500000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\ole32.dll" at 6A400000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\shcore.dll" at 63BC0000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\shlwapi.dll" at 64A40000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\SHELL32.dll" at 7DD10000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-runtime-l1-1-0.dll" at 63740000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-heap-l1-1-0.dll" at 6CA00000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-math-l1-1-0.dll" at 61F80000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-stdio-l1-1-0.dll" at 6B7C0000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-string-l1-1-0.dll" at 6FF00000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-locale-l1-1-0.dll" at 66600000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-filesystem-l1-1-0.dll" at 65D40000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-convert-l1-1-0.dll" at 61F00000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-crt-time-l1-1-0.dll" at 6CF40000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\ntdll.dll" at 7BC00000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\kernelbase.dll" at 7B000000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\kernel32.dll" at 7B600000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\conhost.exe" at 00400000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\ucrtbase.dll" at 7E760000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\sechost.dll" at 6BC00000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\advapi32.dll" at 61740000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\gdi32.dll" at 7E600000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\rpcrt4.dll" at 62FC0000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\version.dll" at 63480000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\setupapi.dll" at 6BCC0000: builtin
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\user32.dll" at 6ED00000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\imm32.dll" at 71200000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-core-synch-l1-2-0.dll" at 6DE80000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-core-fibers-l1-1-1.dll" at 6AC80000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\host\\fxr\\3.1.9\\hostfxr.dll" at 10000000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\hostpolicy.dll" at 00880000: native
011c:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\imm32.dll" at 71200000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\OLEAUT32.dll" at 64EC0000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\bcrypt.dll" at 66240000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\api-ms-win-crt-utility-l1-1-0.dll" at 003B0000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\coreclr.dll" at 00900000: native
0810:fixme:heap:GetNumaHighestNodeNumber semi-stub: 0039F67C
0810:fixme:ntdll:EtwEventRegister ({e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 00AFD380, 00CE9D00, 00CE9D00) stub.
0810:fixme:ntdll:EtwEventRegister ({763fd754-7086-4dfe-95eb-c01a46faf4ca}, 00AFD380, 00CE9C90, 00CE9C90) stub.
0810:fixme:ntdll:EtwEventRegister ({a669021c-c450-4609-a035-5af59af4df18}, 00AFD380, 00CE9CC8, 00CE9CC8) stub.
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-core-windowserrorreporting-l1-1-0.dll" at 6CE80000: builtin
0810:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\mscordaccore.dll", 00900000) stub
0810:trace:loaddll:free_modref Unloaded module L"C:\\windows\\system32\\api-ms-win-core-windowserrorreporting-l1-1-0.dll" : builtin
0810:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Private.CoreLib.dll" at 31000000: native
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\api-ms-win-core-synch-l1-1-0.dll" at 62940000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\clrjit.dll" at 03630000: native
0810:trace:loaddll:build_module Loaded L"Z:\\home\\cam\\dotnet\\32\\CoreWPF.dll" at 039F0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\PresentationFramework.dll" at 10590000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\WindowsBase.dll" at 10110000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Runtime.dll" at 03AB0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\System.Xaml.dll" at 03AC0000: native
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\winex11.drv" at 7D160000: builtin
0810:fixme:ntdll:EtwEventRegister ({49592c0f-5a05-516d-aa4b-a64e02026c89}, 003D33EE, 00000000, 010EBE7C) stub.
0810:fixme:ntdll:EtwEventRegister ({5e5bb766-bbfc-5662-0548-1d44fad9bb56}, 003D340A, 00000000, 010EC070) stub.
0810:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 010EC044, 34) stub
0810:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 010EBDB8, 17) stub
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\System.IO.Packaging.dll" at 03C40000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\netstandard.dll" at 03C80000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Private.Uri.dll" at 03CB0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\PresentationCore.dll" at 03CF0000: native
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\mscoree.dll" at 04520000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\mscorlib.dll" at 04500000: native
0810:trace:loaddll:build_module Loaded L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscoreei.dll" at 04790000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\DirectWriteForwarder.dll" at 04940000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Runtime.Extensions.dll" at 049C0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Runtime.InteropServices.dll" at 049F0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Runtime.CompilerServices.VisualC.dll" at 04A20000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Diagnostics.Debug.dll" at 04A30000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Threading.dll" at 04A40000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\Microsoft.Win32.Primitives.dll" at 04A60000: native
0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\dwrite.dll" at 7CC30000: builtin
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Collections.NonGeneric.dll" at 04A70000: native
0810:fixme:nls:CompareStringEx semi-stub behavior for flag(s) 0x8000000
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Linq.dll" at 04A90000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Collections.dll" at 04B00000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\Microsoft.Win32.Registry.dll" at 04B60000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Collections.Specialized.dll" at 04B80000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.ComponentModel.Primitives.dll" at 04BA0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Diagnostics.Process.dll" at 04BE0000: native
057c:fixme:sync:SetWaitableTimerEx (000001D0, 04EAFE90, 500, 00000000, 00000000, 00000000, 50) semi-stub
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Threading.Thread.dll" at 04EC0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\PresentationNative_cor3.dll" at 04EE0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.WindowsDesktop.App\\3.1.9\\System.Configuration.ConfigurationManager.dll" at 04FD0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Xml.ReaderWriter.dll" at 050C0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Private.Xml.dll" at 050D0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.IO.FileSystem.dll" at 05850000: native
0810:fixme:ntdll:NtQuerySystemInformation (0x000000ce,0x39ca3c,0x00000008,(nil)) stub
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Net.WebClient.dll" at 05880000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Memory.dll" at 058B0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Security.Cryptography.Algorithms.dll" at 058F0000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\System.Text.Encoding.Extensions.dll" at 05980000: native
0810:fixme:nls:get_dummy_preferred_ui_language (0x8 0039D70C 00000000 0039D708) returning a dummy value (current locale)
0810:fixme:nls:get_dummy_preferred_ui_language (0x8 0039D70C 01110660 0039D708) returning a dummy value (current locale)
0810:fixme:virtual:NtFlushProcessWriteBuffers stub
012c:fixme:seh:NtQueryInformationThread ThreadIsIoPending info class not supported yet
wine-5.19 in ubuntu-20.04.1-desktop-amd64

The CoreWPF.exe is very simple GUI with only one button and one textbox, it work well in windows.

Does anyone could help to tell how can I do ? Thanks very much!!!
fargodwe

Re: How could WPF .NET Core run in Wine?

Post by fargodwe »

First off, I am just a novice user, not one of the experts here. I did notice you said DX. Is that like in DirectX? If so you may need to use winetricks and install one of the DirectX dlls.
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: How could WPF .NET Core run in Wine?

Post by spoon0042 »

zhcarey wrote: Thu Oct 22, 2020 2:16 am 0810:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\mscoree.dll" at 04520000: native
0810:trace:loaddll:build_module Loaded L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\3.1.9\\mscorlib.dll" at 04500000: native
0810:trace:loaddll:build_module Loaded L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscoreei.dll" at 04790000: native
Did you previously install native .net in this wineprefix? Kind of defeats the purpose. :)
madewokherd
Level 4
Level 4
Posts: 149
Joined: Mon Jun 02, 2008 5:03 pm

Re: How could WPF .NET Core run in Wine?

Post by madewokherd »

Builtin or native mscoree shouldn't matter for .NET Core purposes (except that apparently .NET Core requires mscoree.GetTokenForVTableEntry for mixed-mode support, and that was only recently implemented in Wine).
Mikko_H
Level 1
Level 1
Posts: 5
Joined: Wed Oct 21, 2020 10:02 am

Re: How could WPF .NET Core run in Wine?

Post by Mikko_H »

Not sure what .NET core is but if you're just trying to run WPF applications on wine, have a look at this:

https://www.reddit.com/r/linux4noobs/co ... with_wine/

Both methods have worked for me.
Locked