How to launch a WPF application using a custom native host #85421
-
Hi, Looking at a WPF/.Net 6 application, I see that there's an exe-file which is the host/launcher of the actual .Net application, which is in a dll-file. Is it possible to replace this .exe file with my own using https://learn.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting? Basically I just want to do this: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Use the |
Beta Was this translation helpful? Give feedback.
-
I looked at the source for dotnet.exe and was able to write my own host. |
Beta Was this translation helpful? Give feedback.
Use the
hostfxr_run_app
instead of getting a function pointer to a method.Some more description of the available functionality is here: https://github.com/dotnet/runtime/blob/main/docs/design/features/native-hosting.md