Have you enabled building a Contract Reference Assembly (section 6.5 of the manual)? That functionality is designed to solve precisely this problem.
CodeContracts on interfaces doesn't works across different projects in one solution
-
27-06-2022 - |
質問
I have a solution where one projects contains public interfaces & another - their implementations. Interfaces is decorated with contracts. It turned out during testing that
- if interface implementation is in the same project as the corresponding interface than contracts engine works without any issues
- if interface implementation is in another project as the corresponding interface than contracts engine doesn't work.
What can be done in order to solve this issue?
Sample project is here: http://www62.zippyshare.com/v/58772452/file.html (68 kB)
Platform: MSVS 2012 / CodeContracts 1.5.60813.10
解決
所属していません StackOverflow