问题
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