Problem with code contracts when build on android and ios

ArnaudMArnaudM Marcille ArnaudUSMember

Hi,

I recently updated Xamarin on my computer to Xamarin 4.5.0.476, Xamarin.Android 7.3.1.2 and Xamarin.iOS 10.10.0.35.

Since the update is installed, I can't build any Xamarin project (Android or IOS) who use the Code Contracts.

I did several tests on new projects, but I Have always the same error: (here on an Android app)

1>Using "Exec" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "Exec"
1> "C:\Program Files (x86)\Microsoft\Contracts\Bin\ccrewrite.exe" "@App1ccrewrite.rsp"
1> Reading assembly 'mscorlib' from 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' resulted in errors.
1> Tentative de déplacement du pointeur de fichier avant le début du fichier.
1>
1>ccrewrite : error : Rewrite aborted due to metadata errors. Check output window
1> elapsed time: 232,3422ms
1>C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v14.0\Microsoft.CodeContracts.targets(265,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft\Contracts\Bin\ccrewrite.exe" "@App1ccrewrite.rsp"" exited with code -1.
1>Done executing task "Exec" -- FAILED.

Does anyone ever see this problem? And how to solve it?

Thank you in advance for the proposals

Sign In or Register to comment.