Code contracts - Rewriter fails with missing reference

∥☆過路亽.° 提交于 2019-12-24 02:08:01

问题


I'm trying to use code contracts for some libraries I have. My library A has a reference to ThirdParty library B. Library C references A, and never uses B nor does it use the bits of A that use B. The rewriter fails though trying to find library B. The reference assembly for A exists, I was hoping that the rewriter would be just happy with that.

Any ideas on how I can build this, short of moving the bits in A that rely on B out into its own assembly?

EDIT: To answer a question, yes, there are public types in A which expose types in B. I was hoping those the analysis would end at the library A, and that it would treat B as if there was no reference assembly at all (ie, ignore it).


回答1:


It seems that there is no way around this. In some regards I think its good as it helps you see where your third party dependencies are leaking.



来源:https://stackoverflow.com/questions/7720652/code-contracts-rewriter-fails-with-missing-reference

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