I have a Resharper, and this is a fantastic Project Launch tool, and I need to use CodeContracts . However, Resharper ignores them. After checking several blogs, I came across this:
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 anyone managed to create codecontracts and resharper for collaboration?
Edited
What i do
Trying to use codeContract and resharper gives Method invocation is skipped , etc.
Googled and found many people with the same problem and without a 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 a contract with the code, and resharper will not let you. It will be disabled, and if you enable it, you will get another error.
Comment from the Resharper team http://youtrack.jetbrains.com/issue/RSRP-182553#comment=27-200330
ReSharper will not support Code Contracts, as is the case for the medium term future. There are two main reasons for this:
- CodeContracts are written to a code block and, in addition, to a separate assembly. ReSharper requires contracts to be metadata level
- The current contract is too complex and should not be analyzed in real time.
During the development of ReSharper, we analyze CodeContracts and build the appropriate annotation labels for ReSharper code. We are going to expand our annotations and always keep them in sync with contracts.
I'm full !!!
source share