CC rewriter dependency, do we need it?


At the moment the Ncqrs Framework is using Code Contracts. But since there are some contracts that require the Code Contract rewriter to work. On top of that, you will get an error when the rewriter is not available when you run the solution. This can be solved by installing the latest version of Code Contracts, but this dependency is not ideal for the current code-only release. Since it adds an extra dependency to the project.


gibbensr wrote Apr 14, 2010 at 10:31 PM

I have VS2010 installed, and downloaded the latest source. I have also installed the latest Code Contracts. When I try to run the project, I get a "must use rewriter when using contract.requires<TException>" exception. It occurs in MongoDbEventStore.cs, on the line Contract.Requires<ArgumentNullException>(mongo != null);

Do I get a beer? ;)

gibbensr wrote Apr 15, 2010 at 6:41 AM

And, of course later I find that I have your blog post already starred to read later.


nesteruk wrote May 10, 2010 at 9:58 AM

Am getting the same error. It would indeed be great if this dependency was removed.