Code Contracts, the library, has always been free. The static checker, the really important piece, was only available in expensive editions for commercial use.
The other problem w/ Code Contracts is inheritance. A call to base.DoStuff(arg); might fail, even though the child class handles it and doesn't need the contract to be satisfied by the parent.
Is there a difference between design-by-contract and the condition modifications allowed by the Liskov substitution principle? They seem related but I'm not well-enough versed in the differences.
"...the subtype must meet a number of behavioral conditions. These are detailed in a terminology resembling that of design by contract methodology, leading to some restrictions on how contracts can interact with inheritance:
Preconditions cannot be strengthened in a subtype.
Postconditions cannot be weakened in a subtype.
Invariants of the supertype must be preserved in a subtype."
I see. This is new, it used to be so that although the APIs were available, only Premium, Ultimate and Test had the tooling to generate verifiable builds.
You need at least the Premium edition for the required tools.