Monday, January 17, 2011 1:08 PM
When a contract fails showing an assert dialog, sometimes the dialog is larger than screen (i.e. 2049px height on 1280x1024) . Then you cannot dismiss the dialog with mouse, you must recall the keyboard shortcuts for Abort, Retry & Ignore.
Maybe this issue doesn't have much to do with Code Contracts, but it occurred to me only when using CC library.
Anyone has the same issue?
.NET 4 app, VS 2010 on Win7. CC Standard 1.4.31130.0.
- Edited by Josef Bláha Monday, January 17, 2011 1:11 PM Added my system details.
Thursday, February 02, 2012 6:49 AMAnyone?
Thursday, February 02, 2012 12:55 PM
I've had the same issue but I don't think there's anything the CC team can do about it.
Monday, February 06, 2012 7:17 AM
Thanks for response Dave!
I see. I thought they could do something like the default trace listener does when showing an assert dialog in the System.Diagnostics.AssertWrapper.ShowMessageBoxAssert method. It uses some magic to ensure the message fits the screen.
Monday, February 06, 2012 3:35 PM
Well that's an internal type. It seems that the tools simply generate wrappers that call into the .NET Framework's TriggerFailure method, which ends up calling some internal Assert.Fail method to show the dialog. So perhaps they'll make this change in .NET 5.0, or they could change the tools now to output code similar to TriggerFailure in our assemblies and then invoke it using reflection, though I wouldn't count on them doing that ;)