在MEF覆盖的DLL [英] Overwriting dlls in MEF

查看:166
本文介绍了在MEF覆盖的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我试图分离出一组不断变化的类到自己的DLL和动态使用MEF加载它们。我的问题是,每当我试图重写应用程序运行时的DLL,它说,它是在使用。

Right now, I'm trying to separate out a set of constantly changing classes into their own dll and dynamically load them using MEF. My problem is that whenever I try and overwrite the dll while the app is running, it says it's in use.

反正是有配置MEF让我改写的DLL,拿起,而应用程序仍在运行的变化?

Is there anyway to configure MEF to let me overwrite the dll and pick up the changes while the app is still running?

推荐答案

这是不是一个MEF的问题 - 它是你的AppDomain标准设置,它可以锁定DLL的感动。检查的http://www.vistax64.com/powershell/26164-reflection-assembly-loadfile-locks-file.html对于类似的问题不involveind MEF。

This is not an MEF issue - it is your appdomain standard setup that locks the DLL's touched. Check http://www.vistax64.com/powershell/26164-reflection-assembly-loadfile-locks-file.html for a similar issue not involveind MEF.

基本上,不会对DLL的运行,请先复印一份,并在复印件工作;)

Basically, do not run on the dll's, make a copy first and work on the copy ;)

检查 http://bartdesmet.net/blogs/bart /archive/2006/07/29/4146.aspx 的AppDomain的影拷贝机制;)

Check http://bartdesmet.net/blogs/bart/archive/2006/07/29/4146.aspx for the AppDomain ShadowCopy mechanism ;)

这篇关于在MEF覆盖的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆