CodeContractsRemover 1.0.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CodeContractsRemover --version 1.0.6
NuGet\Install-Package CodeContractsRemover -Version 1.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeContractsRemover" Version="1.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CodeContractsRemover --version 1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeContractsRemover, 1.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CodeContractsRemover as a Cake Addin #addin nuget:?package=CodeContractsRemover&version=1.0.6 // Install CodeContractsRemover as a Cake Tool #tool nuget:?package=CodeContractsRemover&version=1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Introduction
Tool for removing .NET Code Contracts from source code. Currently only C# is supported. I will gladly accept PR with VB support.
Installation
Install-Package CodeContractsRemover
Usage
Tool is located at "PROJECT_DIR/packages/CodeContractsRemover.VERSION/tools/".
code_contracts_remover.exe <Convert|Remove> <directoryPath> [searchPattern=*.cs] [encoding=utf-8]
Example
code_contracts_remover.exe Convert ./myproject
To run using mono on Mac OS X
/Library/Frameworks/Mono.framework/Commands/mono code_contracts_remover.exe Convert ./myproject
To run using mono on Linux
/usr/bin/mono code_contracts_remover.exe Convert ./myproject
Modes
Mode - Convert
- Converts all Contract.Requires to "if(!x) throw new ArgumentException()" pattern.
- Converts all Contract.Assert to Debug.Assert
- Removes any other Contract invocations.
- Invariant methods are preserved
- Attributes and Contract classes are removed
Mode - Remove
- Removes any Contract invocations.
- Invariant methods are preserved
- Attributes and Contract classes are removed
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.