What is the difference between NET40-RequiresCastle and NET40 version of Moq?

吃可爱长大的小学妹 提交于 2019-12-07 22:41:05

问题


In the distribution of moq, there are two versions, NET40-RequiresCastle and NET40. The NET40-RequiresCastle seems to have much smaller size than the NET40, but requires Castle during runtime. Is the difference only the fact that Castle is embedded inside the NET40 version, or is there going to be difference in performance, usage, etc?

Is there a reason to use NET40-RequiresCastle instead of NET40?


回答1:


MoQ uses Castle DynamicProxy for proxy generation. In order to simplify the deploy that dll is "IL merged" into the redistributable that does not require Castle Library. If you already use the DynamicProxy library in your project you would probabli use the RequireCastle distribution, to avoid having the dll deployed twice. If you don't use Castle somewhere else in your project, you probably prefer the merged one, since you have less dll to take care in the deploy.



来源:https://stackoverflow.com/questions/12104769/what-is-the-difference-between-net40-requirescastle-and-net40-version-of-moq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!