c# - 如何将 F# dll 动态加载和卸载到 C# 项目中?

标签 c# dll f# dynamic-allocation

我了解如何将 F# dll 加载到项目中。但我希望能够动态加载它们的特定部分,并且不会因 dll 纯粹的功能而对性能造成重大影响。

最佳答案

To unload an application domain

There is no way to unload an individual assembly without unloading all of the application domains that contain it. Use the Unload method from AppDomain to unload the application domains. For more information, see How to: Unload an Application Domain.

取自 https://msdn.microsoft.com/en-us/library/ms173101.aspx

这个想法是为 F# 库初始化一个新的应用程序域,然后在使用完毕后将其删除。我认为您必须确保将 F# 库编译为强命名程序集并将其添加到 GAC 中才能完成此任务,但我并不肯定。

关于c# - 如何将 F# dll 动态加载和卸载到 C# 项目中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37062630/

相关文章:

c# - 'float' 的最大值是多少?

c# - 数据集 - 类模型 - 如何从数据集中获取 bool 值

python - 如何从Python加载用tcl编写的dll文件

c# - 访问冲突异常

inheritance - F# 将额外的情况添加到外部 DU

.net-core - SSE 和 AVX 的 MoveMask 的目的是什么

c# - WebClient 下载字符串(几个字符页面)太慢了

c++ - 通过*.dll 文件调用*.exe 文件并提交参数

debugging - 有调试生产功能程序的实际经验吗?

c# - Active Directory PrincipalContext.ValidateCredentials 域消歧