Release 1.2.21023.14 (Oct 24, 2009)
A quick bug fix release for the problem on VS2010 Beta2 where the static checker errouneously warns about adding requires in contract classes for interfaces.
Other improvements:
- The rewriter now checks if the produced assembly remains verifiable
- Static checker handling of boxing improved
Release 1.2.21022.12 (Oct 22, 2009)
This release mainly contains bug fixes.
VS2010 Beta 2 now supported
-
Starting with this version, VS2010 Beta 2 is supported.
-
Known Beta2 issues: some messages from static checker seem to be missing on first builds after loading a project/solution. Rebuild should solve it.
Contract Reference Assemblies
In previous versions of the tools, contract reference assemblies were built automatically on-demand for any project referenced by a project that used contracts. We changed this so that you need to enable "Build" for contract reference assemblies on any project for which the contract reference assembly may be needed. Please see Section 6.4 in the user documentation for more info on this.
Runtime Checker
-
Fixed object invariant inheritance for runtime checking which resulted in code generation errors.
-
Fixed inheritance of interface contracts onto structs (caused bad code in some cases)
- Old value evaluation now under try-catch to guard against conditionally needed old values
- Stricter checking of usage of contract methods
- Fixed generic method instantiation related to nested classes
- Better source contexts for some errors
- Fix for missing source files for WPF projects
Static Checker
- Fixed wrong reporting of unreached code
- Improved precision for handling lengths of generic collections
- Fixed several bugs caused by large numbers
- Fixed working of warnings on unnecessary assumptions
Framework Contracts
- Added contracts in System.Windows.Forms
- Added contracts in System.Data
Release 1.2.20903 (4 Sep 2009)
Feature updates
- No API changes!
- Silverlight 3 support
- New tool:
- Contract documentation generation via XML docs and Sandcastle
- Please read the documentation and the CodeContracts/Sandcastle/Readme reachable from the Start Menu
- Runtime checking
- Object invariant can be split into multiple methods
- Object invariant methods can be private
- Initial support for contracts on iterators
- Static checking
- Support for floating point reasoning
- Check for redundant assumptions
- More contracts for framework assemblies
Bug fixes
- Bad Contract Reference Assemblies for .NET have been fixed. This should fix problems with “method not found” failures and other verification problems in the rewritten code.
- Contract reference assemblies should now work for Silverlight 2 and 3. Warnings related to X509 certificate types should be gone.
- Better extraction of contracts from constructors in C# and VB
- Handling of contracts involving generic methods
- Handling of compiler generated locals shared between contracts and method bodies.
- Handling in generated code to throw user selected exception when constructor unavailable
- Stack overflow issues in static checker.
Release 1.2.20518 (20 May 2009)
Heads up: This release contains some changes to the Contracts API and
its usage guidelines. Please review the beginning of Section 5 in the
documentation even if you looked at it in the past. Also, the runtime
behavior has changed again. Please see Section 7 in the documentation.
Feature updates
- Contract.RequiresAlways deprecated
- Contract.Requires<TException> added
- ContractException is now internal
- Contract tools work with VS2010 Beta1.
- Runtime checking
- Client side requires checks (Section 6.1)
- Check box allows switching between assert/throw behavior
- Static checking
- SuppressMessage attribute supported
- Many more contracts for framework assemblies
Bug fixes
- Hang issue of both rewriter and static checker due to Pdb reading
fixed. - Abstract class contracts properly inherited when generics and closures involved.
- Ambiguity between user and condition strings in contract reference assemblies removed.
- Static checker no longer fails when Linq expression trees are present.
- Fixed bug in MSBuild integration where wrong KeyContainer was used for signing.
- Many static checker precision improvements.
Release 1.1.20415 (15 April 2009)
This release adds a commercial version for Standard VisualStudio 2008 (without the static checker). In addition the following issues were addressed:
- More contract reference libraries for System.Xml, System.Data, System.Windows.Forms, System.Drawing, System.Security
- Contract class allows partially trusted callers
- Silverlight and WPF builds now supported
Runtime Checker fixes
- Pure is now inherited and need not be repeated on overrides/implementations
- Fixed problem with level of checking being applied incorrectly to inherited contracts
- Provided more levels of checking
- Allow erasure of all contracts not on public surface of an assembly
- Fixed debugging issue with Silverlight applications
- Fixed Ensures source context issues to improve stepping accuracy
- Fixed problem with contract reference assemblies for executables
Static Checker fixes
- Pure functions of multiple arguments are now handled
- Strongly typed resources are assumed non-null
- Unsatisfiable requires are now flagged
- VB constructors can now have contracts (fixed extraction problem)
- Property Pane custom arguments can now override default arguments
Release 1.1.20309 (9 March 2009)
This release fixes a number of smaller issues with the prior release:
- Changed the default behavior for contract failure. It now throws a ContractException containing the failure kind (requires,ensures, etc), as well as the condition and potential user string. The ContractFailed event still allows further customization
- Many more contracts for BCL libraries have been written. Please report high priority areas where we are still missing them or where they seem wrong.
- Option for checking arithmetic properties (div by zero and negation of minint) now in the UI.
- Code snippets for VB installed
- Bug fixes
- Purity now visible from contract reference assemblies
- InternalsVisibleTo should now work when using the static checker
- Initial preview of Silverlight support. The rewriter runs and instruments the code, but debugging (stepping, breakpoints) does not work yet.
Release 1.1.20215 (23 February 2009)
This is a major revision of the tools from the previous 1.0.1 release in terms of quality improvements.
- Interface contracts are now fully supported.
- Generics are fully supported.
- Many precision improvements to static checking
- Samples with documentation
- Integration of warnings in Visual Studio Error List and squigglies
- Background Static Checking
- Initial contracts for mscorlib.dll and Microsoft.VisualBasic.dll.
- Updated documentation.



