我了解如何将 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/