Derik Whittaker

Syndication

News


Error: Contract.Requires<TException> must use the rewriter

If you are new to use the Code Contracts Library from Microsoft one exception you may run into is this

Description: Must use the rewriter when using Contract.Requires<TException>

image

What this error is telling you is that you must turn on the runtime checking for the project which hosts the code. 

image

One thing to pay attention to is that you MUST turn this on not for the project which calls the code w/ contracts, but rather the project that actually has the contracts call in it.

BTW, in order to get the Code Contracts pane in the project options you must down load the latest version of the CC library from MS Research.

Hope this helps the next person w/ this error.

Till next time,


Posted 06-30-2010 6:36 AM by Derik Whittaker
Filed under: ,

[Advertisement]

Comments

Surveying Tools wrote re: Error: Contract.Requires<TException> must use the rewriter
on 07-06-2010 4:39 PM

thank you, i fixed it now

viagra wrote re: Error: Contract.Requires<TException> must use the rewriter
on 09-12-2010 1:15 PM

YGzFOVQ  <a href="http://rusars.com/ ">zFUUeBWF</a>

XAML Sorpresa wrote Primer contacto con Code Contracts (no es un tutorial)
on 10-06-2011 4:00 AM

Hola, me llamo Pablo y hoy he sufrido mi primer contacto forzoso con Code Contracts. Lo de forzoso no

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)