本文介绍了.NET中的动态DLL引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在控制台应用程序中动态引用DLL? 我想在控制台应用程序中动态更改mysql.data [即mysql连接器]参考.由于每次都有许多应用程序,因此无法使用新的 mysql连接器重建应用程序. 因此,请提出一种消除此问题的方法.
Is there a way to reference DLLs dynamically in console applications? I want to change my mysql.data [i.e mysql connector] reference dynamically in console applications.As we have many applications eachtime we can not rebuild applications with new mysql connector. So pls suggest a way to get rid of this.
推荐答案Reflection应该可以实现这一目标. 此处 [ ^ ]. Reflection should allow you to achieve this. A very nice and easy guide here[^].
这可能会有所帮助, 依赖注入 [ ^ ] 依赖注入框架-第1部分-简介 [ ^ ] Dependency-injection-choose-dll-and- class-implementation-at-runtime-through-con [ ^ ] :) It might be helpful, Dependency Injection[^] Dependency Injection Frameworks - Part 1 - Introduction[^] Dependency-injection-choose-dll-and-class-implementation-at-runtime-through-con[^] :)
更多推荐
.NET中的动态DLL引用
发布评论