DirectoryManifestTask MSBuild Task

The MSBuild Directory Manifest Generator includes a custom MSBuild task for generating a directory manifest.

Task Name: DirectoryManifestTask
Containing Assembly: BOSTools.DirectoryManifestGenerator.dll
Inputs:
TargetDirectory: Property specifying the directory to recurse to generate the manifest
OutputFile: Property specifying the filename of the generated Xml file

A sample MSBuild project file that uses the DirectoryManifestTask is shown below.

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">

<PropertyGroup>
    <TasksDir>BOSTools.DirectoryManifestGenerator\bin\debug</TasksDir>
    <TargetDirectory>BOSTools.DirectoryManifestGenerator</TargetDirectory>
    <OutputFile>c:\automatic.xml</OutputFile>
</PropertyGroup>

<UsingTask AssemblyFile="$(TasksDir)\BOSTools.DirectoryManifestGenerator.dll" TaskName="DirectoryManifestTask"/>

<Target Name="GenerateManifest">
    <DirectoryManifestTask TargetDirectory=
            "$(TargetDirectory)" 
        OutputFile=
            "$(OutputFile)">
    </DirectoryManifestTask>
</Target>

</Project>


This project file can be executed from a Visual Studio 2008 command line via

msbuild <.proj filename> /t:GenerateManifest

The source code includes a sample MSBuild .proj file and .bat file for running the Directory Manifest Generator against the debug version of the built source code.

Last edited Aug 18, 2009 at 4:24 AM by mcating, version 3

Comments

No comments yet.