Code Contracts and VS2005 RRS feed

  • Question

  • Will Code Contracts work with VisualStudio2005 Team Edition For Software Developers (none of the Team System elements are loaded so I presume that is basically equivalent to VS2005 Professional)?  The Code Contracts Documentation PDF doesn't seem to jive with the Code Contracts documentation on the MSDN site, and so, to me this issue is not clear. 

    Steps Taken:
    (1) downloaded the latest STD version (v1.2.20518.12),
    (2) created a WinForms C# test app in VS2005, 
    (3) added a reference to the Microsoft.CodeContracts.dll,
    (4) added a 'using System.Diagnostics.Contracts;' line in the app source code,
    (5) and added a Contract.Requires() call in a test app method. 

    On running the test app, when that method is called, it throws an error stating "Must use the rewriter when using Contract.Requires()".  I presumed that the rewriter functionality was included and installed with the downloaded Contracts.devlab9std.msi.  The Documentation also states that "with the Code Contracts 'plugin' installed, an additional 'Code Contracts' tab should be seen in the project properties."  I am not seeing that either.  Is the 'Code Contracts 'plugin' mentioned in the Documentation separate from the CodeContracts.dll.  What am I missing?
    Friday, June 26, 2009 8:27 PM


  • Hi,

    VS2005 is not supported. Only VS2008 and VS2010 are at the moment.

    Sorry about that.

    Cheers, -MaF (Manuel Fahndrich)
    Friday, June 26, 2009 9:57 PM