Search code examples
c#code-contracts

Cant Emit Code Contracts into XML doc file


Code Contracts Version: 1.9.10714.2

Receiving this error when I attempt to "Emit contracts into XML doc file" (See image).

To be clear the error only occurs when the checkbox is ticked (See image).

Error Screenshot


Solution

  • Thanks to Matthew Watson downloading 1.10.20606.1 will stop this error (https://github.com/Microsoft/CodeContracts/releases/tag/v1.10.20606.1).

    The current version (1.9.10714.2) which is in vs(https://marketplace.visualstudio.com/items?itemName=RiSEResearchinSoftwareEngineering.CodeContractsforNET) has the error.