ccrewrite

Why is ccrewrite.exe not doing anything from the command line?

亡梦爱人 提交于 2019-12-18 03:49:09
问题 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 sample app: using System.Diagnostics.Contracts; public class Dummy { public static void Main(string[] args) { Contract.Requires(args.Length > 0); } } I then compile the code and run ccrewrite.exe on it: > csc /debug+ /D:CONTRACTS_FULL Dummy.cs > ccrewrite /o:RewrittenDummy.exe Dummy.exe elapsed time: 61ms There's no RewrittenDummy.exe file

Why is ccrewrite.exe not doing anything from the command line?

拟墨画扇 提交于 2019-11-29 02:54:50
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 sample app: using System.Diagnostics.Contracts; public class Dummy { public static void Main(string[] args) { Contract.Requires(args.Length > 0); } } I then compile the code and run ccrewrite.exe on it: > csc /debug+ /D:CONTRACTS_FULL Dummy.cs > ccrewrite /o:RewrittenDummy.exe Dummy.exe elapsed time: 61ms There's no RewrittenDummy.exe file afterwards. I've tried loads of options, but nothing's making any difference. A few things I've noticed: