Problem with loading dotnet hostfxr from c++
-
- Newbie
- Posts: 1
- Joined: Sat Apr 15, 2023 11:09 pm
Problem with loading dotnet hostfxr from c++
I have a c++ dll that uses the hostfxr to load c# dll's in order to mod a game. The game is for windows only, hence why it's being run through wine. Currently I'm running into an error in the loading related to the hostfxr not being loaded and/or located. The error message simply states "Error when loading hostfxr". This error stems from the get_hostfxr_path function of dotnet called while attempting to load the hostfxr. Looking through the dotnet runtime's source I can find 2 calls to the windows api used to load this, GetModuleFileNameW and GetModuleHandleW. I doubt there is a problem in wine with these functions given their importance, but was wondering what could cause them to fail in this case. The hostfxr library does exist in the prefix, and the dll is otherwise findable, so I'm not sure why it isn't working. It could also be unrelated to those functions, that's just what I was able to figure out about it. Wine version is 8.2.
Re: Problem with loading dotnet hostfxr from c++
You can use the WINEDEBUG environment variable
to let wine generate a verbose log in the console.
(and save that also in a logfile with 'tee' )
I redirect stderr to stdout to have both in the log
and to reduce the logfile size, i start wine before with:
wine control &
And then the problematic program:
WINEDEBUG=+module wine yourapp.exe | tee logfile.txt
--
Regards ... Detlef (winspool)
to let wine generate a verbose log in the console.
(and save that also in a logfile with 'tee' )
I redirect stderr to stdout to have both in the log
and to reduce the logfile size, i start wine before with:
wine control &
And then the problematic program:
WINEDEBUG=+module wine yourapp.exe | tee logfile.txt
--
Regards ... Detlef (winspool)
Re: Problem with loading dotnet hostfxr from c++
I tried this and it works.winspool wrote: ↑Sat Jun 10, 2023 6:48 pm You can use the WINEDEBUG environment variable
to let wine generate a verbose log in the console.tiny fishing
(and save that also in a logfile with 'tee' )
I redirect stderr to stdout to have both in the log
and to reduce the logfile size, i start wine before with:
wine control &
And then the problematic program:
WINEDEBUG=+module wine yourapp.exe | tee logfile.txt
--
Regards ... Detlef (winspool)