Chuck Conway

In The craft

Code Contracts in Visual Studio Beta 11

March 22, 2012 · 1 minute read

Download and install the code contract msi.

Code contracts will be installed on your machine, but you’ll notice that Visual Studio beta 11 does not see them. You’ll need to run the Visual Studio beta 11 installer and “Repair” the install.

Another snag that might be encountered if you have Resharper installed is “JetBrains.ReSharper.TaskRunner.CLR4.MSIL.exe - Precondition failed.” Enabling the Contract Reference Assembly will resolve the issue. You’ll notice once this is enabled a folder called “CodeContracts” in the bin/debug directory.