I have Resharper and it's a fantastic tool
Starting a projects and I need to use CodeContracts
. However Resharper ignores them.
After checking a few blogs I came across this one:
http://www.infinitec.de/post/2010/11/18/Using-Code-Contracts-Visual-Studio-and-with-Resharper.aspx
However I get an error
Error 2
The command ""C:\Program Files (x86)\Microsoft\Contracts\Bin\ccrewrite"
"@MyProject.Coreccrewrite.rsp"" exited with code 1.
Has anybody managed to have codecontracts and resharper to work together?
Edited
What I am doing is
Trying to use codeContract and resharper gives a Method invocation is skipped
etc..
Googled and found lots of people with same problem and no solution.
As you can see I attached a link that should have done the trick but didnt
Create a new project in vs2012 and try to use code contract and resharper will not let you. It will be disabled and if you enable it you get another error
Comment from Resharper team on http://youtrack.jetbrains.com/issue/RSRP-182553#comment=27-200330
ReSharper will not support "Code Contracts" as is in the mid-term future. There are 2 main reasons for this:
- CodeContracts are written in the code block, and, moreover, in the separate assembly. ReSharper requires contracts to be at the metadata level
- Current contract are too complex and are not supposed to be analyzed in real-time.
During ReSharper development, we analyze CodeContracts and building corresponding ReSharper code annotation marks. We are going to extent our annotations, and always keep them in-sync with contracts.
I am stuffed!!!