找AppDomain中的其他.NET框架进程框架、进程、AppDomain、NET

2023-09-05 01:42:00 作者:孤独、也是一种态度゜

我试图让的AppDomain 为我所有的机器上运行.NET框架的进程。如何做到这一点有什么建议?

I am trying to get the AppDomain for all the .NET Framework processes running on my machine. Any advice on how to do that?

推荐答案

我不是你正在努力做什么,但如果你想通过附加的Visual Studio到进程枚举所有正在运行的应用程序域,看到该链接完全清楚: 杰克Gudenkauf列举的AppDomain

Im not entirely clear on what you are trying to do, but if you want to enumerate all running AppDomains by attaching Visual Studio to a process, see this link: Jack Gudenkauf "Enumerating AppDomains"

在那同样,如果你想这样做,在运行时(不Visual Studio的),那么你可能需要在程序中包含有管理的调试器,这将允许你'附加'到另一个进程。 看看在托管调试的例子,这表明一个调试器,用C#编写。然后,它可以让你的目标应用程序中执行扩展名,如杰克Gudenkauf的文章做。 CLR托管调试器(MDBG)样品

In that same vein, if you want to do this AT RUNTIME (without Visual Studio) then you will probably need to include a managed debugger in your program which will allow you to 'attach' to another process. Take a look at the managed debugger example, this demonstrates a debugger, written in C#. It will then allow you to execute an 'extension' within the target application process, such as is done in Jack Gudenkauf's article. CLR Managed Debugger (mdbg) Sample