如何加载System.Runtime.Remoting DLL?

时间:2012-07-06 12:27:08

标签: c# load startup .net-assembly ui-automation

如何加载C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Runtime.Remoting \ 2.0.0.0__b77a5c561934e089 \ System.Runtime.Remoting.dll? 当然,我想使用最终将加载的相应(取决于要求)版本。

在此处加载意味着我在Visual Studio的调试器窗口中看到了程序集已加载的消息 - 就像我加载任何依赖程序集一样,例如。 G。我自己的。 (你最常在启动时看到它们。)

如果可能的话,我希望这能在启动时运行。

尝试了几件事但没有成功,e。 G:

string dummy = System.Runtime.Remoting.RemotingConfiguration.ProcessId; // force load of remoting dll
GC.KeepAlive(typeof(System.Runtime.Remoting.RemotingServices));
GC.KeepAlive(Assembly.Load("System.Runtime.Remoting.dll, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"));

0 个答案:

没有答案