Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I realize this is an older thread but the question is still a valid one...</p> <p>Assuming the use of .NET 4.0, the System.Diagnostics.Contract classes are already included in mscorlib.dll. So all you'll need to have installed anywhere is the .NET 4.0 runtime.</p> <p>You'll only need to have the CodeContracts package installed to the dev machines and any other machines that compile your binaries down to IL (i.e. via VisualStudio, msbuild using csc.exe - the C# compiler, etc.). There is are several .exes included in that install package. One of them is 'ccrewrite.exe'. This is an IL rewriter that injects IL code into your assemblies <strong>after</strong> the compiler has completed. Note that ccrewrite and the .NET compiler you use for whatever language you are using are <strong>not</strong> related, connected, or share any dependencies.</p> <p>Once your binaries are compiled, there is no need to install or deploy anything to any of the servers where your code will execute. This is true <strong>regardless</strong> of the options you have configured in your Project Settings:</p> <ul> <li>using Runtime Contract checking</li> <li>using Static Contract Checking</li> <li>configured to build the CodeContract Reference Assemblies (you don't need to deploy these either).</li> <li>etc.</li> </ul> <p>The CodeContract Reference Assemblies are only used when you need to expose your contracts to a Library/API that is outside of your Solution and Static Checking is enabled for that project. You also should not directly reference them nor do you need any kind of post-build step to copy them into any bin folder (except in the case I just mentioned about exposing them to another Library/API).</p> <p>HTH</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload