Using CciSharp in the Build

CciSharp integrates in the build through custom MSBuild targets. The targets call into the ccs.exe command line tool at the right place in the build process to rewrite the assemblies produce by the C# or VisualBasic.NET compiler.

Download and place CciSharp

Download the latest binaries from CciSharp. CciSharp is xcopy-deployable, simply drop them in a place that will be convinient to use from your build. Usually, you will want to check those binaries in your source control as well.

Editing your projects

  • Open the project file (.csproj or .vbproj) using a text editor - or - unload the project, then click on the 'Edit Project File'.
  • Modify the project file as follows:
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- begin CciSharp -->
  <Import Project="CciSharp.targets" />
  <!-- end CciSharp -->
  • In the main configuration or separate configuration, enable CciSharp by setting the CcsRewriting property to True:
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

Selecting the mutators

The msbuild tasks will look for assemblies containing mutators in default location. By convention, such assemblies must be named CciSharp.YouNameHere.dll.
  • any assembly in the path of ccs.exe that matches the naming pattern,
  • any assembly in a sub-folder CciSharp from the solution directory,
  • any assembly in a sub-folder CciSharp from the project directory.

If this behavior is not enough, one can provide the location of mutator assemblies by including them into the CcsMutatorAssemblies item.
  <CcsMutatorAssemblies Include=" path to your mutators " />

Last edited Dec 29, 2009 at 3:53 AM by pelikhan, version 6


No comments yet.