Question

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

Was it helpful?

Solution

Have you enabled building a Contract Reference Assembly (section 6.5 of the manual)? That functionality is designed to solve precisely this problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top