These are chat archives for Microsoft/CodeContracts

Sep 2015
Sergey Teplyakov
Sep 07 2015 04:55
@saish-borkar Is it related to CodeContracts? I'm playing with VS Code with TypeScript...
Saish Borkar
Sep 07 2015 15:59
@SergeyTeplyakov can you teach me
Micah Zoltu
Sep 07 2015 21:03
Is there a way to debug whether or not CodeContracts is picking up my third party Contract assembly?
This message was deleted
public class Foo
    public Foo(Third.Party.Library.From.NuGet.Bar bar)
        Contract.Requires(bar != null);
        _baz = bar.Baz;
    } // invariant unproven: _baz != null

    private void ObjectInvariant()
        Contract.Invariant(_baz != null);
In the third party library, Bar contains an invariant method with Contract.Invariant(Baz != null).
Micah Zoltu
Sep 07 2015 21:08
The third party library has a contract assembly in the CodeContracts folder sitting next to the assembly.
I want to know how I can identify whether the bug is with the static analyzer failing or if the static analyzer isn't picking up the contract assembly (which contains the invariants).
I'm running code contracts via Visual Studio.