The following example uses the GenerateBootstrapper task to install an application that must have the .NET Framework 2.0 installed as a prerequisite.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.2.0">
<ProductName>Microsoft .NET Framework 2.0</ProductName>
</BootstrapperFile>
</ItemGroup>
<Target Name="BuildBootstrapper">
<GenerateBootstrapper
ApplicationFile="WindowsApplication1.application"
ApplicationName="WindowsApplication1"
ApplicationUrl="http://mycomputer"
BootstrapperItems="@(BootstrapperFile)"
OutputPath="C:\output" />
</Target>
</Project>