Code Contracts
Discuss and provide feedback on Code Contracts.
Anuncios
- Vínculo
It has happened. New VS2010 and VS2012 Contract editor extensions are available on the gallery
It has taken a long time, we know, but we have finally released the contract editor extensions for VS2012 and an update to VS2010.
The new version is much more stable and less CPU consuming than previously and hopefully much more useful as a result.
For VS2012: http://visualstudiogallery.msdn.microsoft.com/02de7066-b6ca-42b3-8b3c-2562c7fa024f
For VS2010: http://visualstudiogallery.msdn.microsoft.com/85f0aa38-a8a8-4811-8b86-e7f0b8d8c71b
If you haven't tried it yet, then please do and let us know what you think!
To review, the extensions should show you method contracts in the following situations:
- While you are typing a call to a method: the signature helper window should show you each overload's contract in the same window as the signature and exception information.
- Hovering over an existing method call: the quick info window should show you the method's contract in addition to its summary information.
- Method override and interface implementation definitions: hover over the method name in the signature to see the tooltip of the contracts inherited (or defined in the method).
- Metadata windows: if you "go to definition" for a type/method that is defined in an external assembly then the metadata window that VS creates should be augmented with method contracts.
Enjoy.
- Vínculo
Release 1.5.60502.11 is now live!
Manuel FahndrichMicrosoft Employeedomingo, 17 de marzo de 2013 23:17Release 1.5.60502.11 is now live!
A new release of Code Contracts is now live on the VS Gallery.
The release notes have been updated.
Please keep using the forum for communicating with us.
The VS editor extensions have also been updated on the gallery.
- Vínculo
Welcome to Code Contracts for .NET
We are so happy that you are interested in Code Contracts! You are at exactly the right place for learning how to use contracts from any .NET language to:
- Specify method preconditions for expressing conditions that a caller must meet in order to call a method.
- Specify method postconditions for expressing conditions that the implementation of a method must meet before returning. Conditions can be specified for both normal termination as well as exceptional termination.
- Specify object invariants that describe the healthy states for an instance of a class.
We currently provide three tools for making use of contracts:
- A binary rewriter that operates as a post-build step to inject the contracts into the appropriate places for them to be evaluated at runtime.
- A static checker that operates as a post-build step to analyze your code without even executing it for potential contract violations.
- A documentation generator that adds information about the contracts to the XML documentation files for your project.
The installer for these tools is available for either commercial or non-commercial use.
We welcome you to use the forum to ask questions about how to use contracts and the tools, to make suggestions for how we can improve, and --- if you really must --- to report bugs and problems.
You can also check out our home page at Microsoft Research. - Vínculo
External projects using Code Contracts?
We have added a section to our web site listing the external projects that we know about which are using Code Contracts. If you would like your project listed, please send us a link and we'll add it to the list. This would really help us in our efforts to get the project more fully supported by the product groups.
Thanks!
Mike
Filtrado y ordenUse estas opciones para limitar la lista de discusiones.
- 367

Can you elaborate what AssumeInvariant actually does ?
onurg jueves, 23 de mayo de 2013 11:49 - 131590

Debugging async methods impossible when rewriter is enabled
Oren Novotny martes, 09 de octubre de 2012 22:36 - 053

Can not find ContractInvariantMethodAttribute in Fakes.dll
gallóglaigh jueves, 23 de mayo de 2013 16:48 - 3142

Code Contracts 1.5.60502.11 generates unexpected error CC1011: This/Me cannot be used in Requires of a constructor
VBA Derks miércoles, 08 de mayo de 2013 7:50 - 2134

Problem highlighting CodeCoverage when using CodeContracts
KrampDotNet viernes, 17 de mayo de 2013 14:03 - 276

Microsoft Fakes vs. class with invariant
Josef Bláha lunes, 20 de mayo de 2013 12:17 - 44507

Contract.Requires<ArgumentException> do not throw userMessage
nazareno.it sábado, 08 de mayo de 2010 6:45 - 135576

Allow throwing a specific exception when contract fails?
winSharp93 martes, 12 de mayo de 2009 19:11 - 1116

Contracts and Globalization using resources
Melor viernes, 10 de mayo de 2013 11:47 - 7241

"Failed to connect to any cache" in 1.5.60409.11
Jesse Sweetland martes, 16 de abril de 2013 13:41 - 284

Inconsistent invariant warning
alan.bradbury.0710 martes, 14 de mayo de 2013 20:24 - 2122

Possibly unboxing a null reference - Ignored Assumption
Dave Sexton lunes, 06 de mayo de 2013 21:39 - 12270

Invariants ignored in 1.5.60409.11?
Jesse Sweetland martes, 16 de abril de 2013 18:54 - 491

"Internal error in Clousot with r.o. inference"
Danny Tuppeny _ NM miércoles, 08 de mayo de 2013 13:38 - 43632

When will F# be supported?
Sebastian Good viernes, 08 de abril de 2011 2:57 - 12176

CC warnings cause build to *fail* when using MSBuild, even if CodeContractsFailBuildOnWarnings=false
DanTup jueves, 25 de abril de 2013 9:56 - 11209

Incorrect code contract documentation is generated
Jonnroc lunes, 29 de abril de 2013 15:41 - 2104

Code contract not working with separate project for interfaces
Haithem Boujerida martes, 07 de mayo de 2013 17:09 - 3248

Get rid of useless null checks
Flusskrebs miércoles, 17 de abril de 2013 15:28 - 9156

Analyser bug? Why does adding an Assert allow another Assert to become proven?
Danny Tuppeny _ NM jueves, 02 de mayo de 2013 15:31

