Handling Contract assertions on Windows Phone 8

If you are a fan of System.Diagnostics.Contracts and use them on WP8 you may find a problem: when a contract fails, you get no clue why. Here’s how to find out. Firstly lets start with a trivial repro app, take the default WP8 project, add a using System.Diagnostics.Contracts, add a button, then this code:         void TestContract(int arg)…

2