开发者

Component based architecture: Replacing an assembly at runtime

开发者 https://www.devze.com 2023-04-08 22:55 出处:网络
Is it a good idea to repla开发者_开发问答ce an assembly at runtime? What problems can I encounter?

Is it a good idea to repla开发者_开发问答ce an assembly at runtime? What problems can I encounter?

Original question: StructureMap - Ability to replace an assembly at runtime

What is the difference in replacing an assembly at runtime within a web- and a non-web application?


The difference is that IIS creates a new shadow copy each time you update a DLL. Hence you get a new AppDomain automatically when you add the new DLL.

WinForms etc doesn't do that magic for you and that's why it won't work.


If the code that runs against that assembly runs in a separate AppDomain and that you shut down the appdomain before doing the operation, you should have no problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号