Code Contracts compile error

  1. Hi Rico,

    As a workaround you can just add this simple PS script to your build:

    $p = 'C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v14.0\Microsoft.CodeContracts.targets'
    $c = [IO.File]::ReadAllText($p)
    $c = $c.Replace('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.6 Tools\sn.exe', '$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe')
    [IO.File]::WriteAllText($p, $c)
    

    At the moment the latest version of code contracts is already installed on build workers: https://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-8...

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:00 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac