I use Code Contracts in my code, my app runs fine on the emulator. When I deploy it on a device, it fails/crashes whenever Contract statement is executed.
public static HTTPRequest CreateGetRequest(string url,
bool shouldUseCustomTimeout)
{
// preconditions
Contract.Requires<ArgumentException>(!string.IsNullOrWhiteSpace(url));
return new HTTPRequest(url,
System.Net.Http.HttpMethod.Get,
shouldUseCustomTimeout);
}
Is the code contract supported on actual device? Should I install a separate extension?