Code Contracts

Discuss and provide feedback on Code Contracts. 

Ankündigungen

  • Welcome to Code Contracts for .NET

    Mike BarnettMicrosoft EmployeeFreitag, 20. Februar 2009 02:28
    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.

  • External projects using Code Contracts?

    Mike BarnettMicrosoft EmployeeDonnerstag, 22. März 2012 17:09

    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

  • New Release for Visual Studio Editor Extensions for C# (v1.4.40602.0)

    Mike BarnettMicrosoft EmployeeSamstag, 4. Juni 2011 00:14

    There is a new release of the VS 2010 editor extensions on the VS Gallery. The extensions themselves haven't changed, but the underlying infrastructure has had many contract-related improvements so I hope it performs better. I will try to get around to fixing the performance problems that everyone has been noticing.

    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: a small graphic should pop up above the method definition showing any inherited contracts.
    • 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.

    Documentation is available at the MSR Code Contracts site.

  • Release 1.4.50327.0 is now live! (Includes Dev11 support -- see note below)

    Mike BarnettMicrosoft EmployeeDonnerstag, 29. März 2012 01:28

    A new release of Code Contracts is now live. Besides some small bug fixes, this release provides support for Dev11. NOTE: In order to see the Code Contracts pane in Dev 11, you must manually run "devenv /setup" from a command prompt (either a Visual Studio command prompt or else one that has a path set so "devenv.exe" (for Dev11) is found).

    If the download links have the usual caching problem, then you can try these:

    Download CodeContracts

    Please keep using the forum for communicating with us. We are trying to make the case for Code Contracts to be included in Visual Studio as an official product. Please send us your feedback as soon as possible, especially if you have any details about how exactly it has helped your development process.

  • Dev11 support

    Mike BarnettMicrosoft EmployeeDonnerstag, 1. März 2012 17:44

    In order to see the Code Contracts pane in Dev11, you must run "devenv /setup" from a command prompt after installing the tools.

    If you have any problems, please let us know!

Filtern und SortierenMit dieser Optionen können Sie die Diskussionsliste eingrenzen.

Artikel 1 auf 20 von 164412345Weiter ›Letzte »
 
AntwortenAbrufe
 
Artikel 1 auf 20 von 164412345Weiter ›Letzte »