Question

I finally have ccrewrite working, and my unit tests are passing, but when I publish a web project, it keeps blowing up as if it hadn't been rewritten. After checking with JustDecompile, the code hasn't been rewritten:

 Contract.Requires<ArgumentNullException>(log != null, "Must provide a valid ILog to UmbracoServiceProvider");
 Contract.Requires<ArgumentNullException>(contentService != null, "Must provide a valid IContentService to UmbracoServiceProvider");
 Contract.Requires<ArgumentNullException>(examineManager != null, "Must provide a valid ExamineManager to UmbracoServiceProvider");

The above should be __ContractsRuntime... if it had been rewritten.

Suggestions?

Was it helpful?

Solution

When publishing, it was building the 'Release' configuration, which has it's own set of code-contract settings which I hadn't set up yet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top