Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何加载System.Runtime.Remoting dll?_C#_Load_Startup_.net Assembly_Ui Automation - Fatal编程技术网

C# 如何加载System.Runtime.Remoting dll?

C# 如何加载System.Runtime.Remoting dll?,c#,load,startup,.net-assembly,ui-automation,C#,Load,Startup,.net Assembly,Ui Automation,如何加载C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Remoting\2.0.0.0_uuB77A5C561934E089\System.Runtime.Remoting.dll? 当然,我希望根据最终加载的需求使用适当的版本 在这里加载意味着我在VisualStudio的调试器窗口中看到这样一条消息:该程序集已加载,就像加载任何依赖程序集时一样,例如。G我自己的。您在启动时最常看到它们 如果可能的话,我希望它在启动时运行 尝试了几件事都没有成功。g、

如何加载C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Remoting\2.0.0.0_uuB77A5C561934E089\System.Runtime.Remoting.dll? 当然,我希望根据最终加载的需求使用适当的版本

在这里加载意味着我在VisualStudio的调试器窗口中看到这样一条消息:该程序集已加载,就像加载任何依赖程序集时一样,例如。G我自己的。您在启动时最常看到它们

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

尝试了几件事都没有成功。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"));

但是你想实现什么呢?事实上,我认为这会在我的程序中引起问题。我注意到在加载.dll的位置附近有一个错误,但它没有,所以它不会导致错误。我昨天才知道。所以没有什么原因,只是出于好奇。看看我的理解是否正确。实际上,当您希望预加载.dll以避免以后出现任何延迟时,这可能会很有趣,但这将是另一种情况。