简体   繁体   中英

How to build modules for a WPF application that run in their own Windows processes?

I'm building my first WPF application which is basically a container window that loads a few pages or "modules" within it. This works, however I would like to make each module its own process within Windows so it could be force quit and wouldn't affect the rest of the application.

As an example, I'd use Google's Chrome. Each tab runs in its own Windows process, and Chrome even has its own internal task manager to manage them. This is what I would like to accomplish but I'm not sure of the best way.

Do I have to create a separate project for each module and then run each executable within my MainWindow? I would prefer to be able to do this from within one project.

Use application domains to isolate tasks that might bring down a process. If the state of the AppDomain that's executing a task becomes unstable, the AppDomain can be unloaded without affecting the process. This is important when a process must run for long periods without restarting. You can also use application domains to isolate tasks that should not share data

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM