I\'ve got Code Contracts working fine from inside Visual Studio 2010, but I can\'t get ccrewrite.exe
to do anything useful from the command line. Here\'s a samp
Okay, this has been answered in the MSDN forum. For once, it wasn't really me being entirely stupid - it's something that could really do with a warning.
Read the forum post for full details, but the basic problem is that ccrewrite
couldn't find the contract classes: it was looking in the .NET 3.5 CLR version of mscorlib
instead of the .NET 4.0 one.
This can be fixed by explicitly listing the path to the relevant assembly:
> ccrewrite /o:rewrittendummy.exe dummy.exe
/libpaths:%SystemRoot%\Microsoft.Net\Framework\v4.0.20506