gpt4 book ai didi

What happends when loading multiple assemblies in 1 application with different target frameworks(在一个具有不同目标框架的应用程序中加载多个程序集时会发生什么情况)

转载 作者:bug小助手 更新时间:2023-10-25 16:35:59 25 4
gpt4 key购买 nike



We have quite an extensive C# application with the ability to load and unload assemblies on-the-go to support plugin functionality by loading extra assemblies.

我们有一个相当广泛的C#应用程序,能够加载和卸载程序集,通过加载额外的程序集来支持插件功能。


Now we are transitioning from .net framework 4.0 to 4.8.
I'm working on one of said plugins and we are going to be the first to have the opportunity to upgrade.

现在我们正在从.Net框架4.0过渡到4.8。我正在开发其中一个插件,我们将成为第一个有机会升级的插件。


So i've tested this, upgrading all our assemblied. Installing the 4.8 runtime and booting the application (which still targets 4.0) and then loading our (4.8) assemblies.
This seemed to work quite well. At first i got one error on a ToString method where an overload couldn't be found but that was due to me not having installed the 4.8 runtime yet.

所以我测试了这一点,升级了我们所有的组装。安装4.8运行时并引导应用程序(仍以4.0为目标),然后加载我们的(4.8)程序集。这似乎很管用。起初,我在ToString方法上遇到一个错误,其中找不到重载,但这是因为我还没有安装4.8运行时。


After i did that everything looked good.
So, i'm wondering, what exactly happends under the hood?
Are the 4.8 assemblies run in a 4.0 runtime? are they being run on a 4.8 runtime and the 4.0 assemblies are still being run in the 4.0 runtime? how does this work?

在我这样做之后,一切看起来都很好。所以,我在想,引擎盖下面到底发生了什么?4.8版的程序集是否在4.0运行时中运行?它们是否在4.8运行时运行,而4.0程序集是否仍在4.0运行时运行?这是怎么回事?


更多回答
优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com