May 25
MSBuild task to build VB6
UPDATE: 13 July 08 --- This task is now available in the FreeToDev MSBuild Tasks Suite
This is not something I thought I would write, but it seems that there are still many out there who have VB6 in their code base and need to have that code built as part of their build process. There are a few ways to do this, but the easiest would be to simply call a MSBuild task. I've therefore added a BuildVB6 task to the FreeToDev.MSBuild.Tasks.dll. Download the update with samples from here.
Parameters
- Projects [Required]: A collection of paths to the VB6 projects. The OutDir is optional and will default to what is set in the .vbp
- VB6Path [Optional]: Defaults to C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe
Sample
<Project DefaultTargets="Execute" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="FreeToDev.MSBuildTasks.tasks"/>
<ItemGroup>
<ProjectsToBuild Include="C:\MyVB6Project.vbp">
<OutDir>c:\bob</OutDir>
</ProjectsToBuild>
<ProjectsToBuild Include="C:\MyVB6Project2.vbp"/>
</ItemGroup>
<Target Name="Execute">
<BuildVB6 Projects="@(ProjectsToBuild)"/>
</Target>
</Project>
NOTE: If you have used the Detokenise task, this release introduces an updated tasks file.