Skip to content

A simple MSBuild task to do differential file analysis for complex deployments.

Notifications You must be signed in to change notification settings

SirkleZero/MSBuild-DiffCopy

Repository files navigation

MSBuild DiffCopy

A custom MSBuild task that will compare two directories and return a list of new, modified and orphaned files. This functionality is particularily useful for doing differential build/deployment on very large projects.

For example, rather than deploy a large number of files, or numerous large files that havent changed, simply deploy only the files that are new or have been modified.

Features

  1. Compare files using an optimized (fast) byte comparison.
  2. Compare operation returns a list of new and modified files.
  3. Orphaned file detection. Find files that exist in the destination but not the source.

Example

<UsingTask AssemblyFile="$(ProjectDir)\DiffCopy\DiffCopy.dll" TaskName="DiffCopy.DiffCopyBuildTask" />
<Target Name="Diff">
  <DiffCopyBuildTask
      SourceDirectory="$(Source)"
	  DestinationDirectory="$(Destination)">
	<Output TaskParameter="NewFiles" ItemName="NewFiles" />
	<Output TaskParameter="ModifiedFiles" ItemName="ModifiedFiles" />
	<Output TaskParameter="NotInSourceFiles" ItemName="NotInSourceFiles" />
  </DiffCopyBuildTask>
</Target>

About

A simple MSBuild task to do differential file analysis for complex deployments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages